Currently I’m developing a new theme for my business. This theme will have a header section with a drop down menu, a slideshow on the background and three featured images with a title, a description and an URL pointing to a page.
Here is a screenshot of the website that I put together in Photoshop.
So I want those featured images appear in the Theme Options page and let myself (the admin) edit the followings:
- Image (select, upload, reset, etc. #uploader)
- Title (e.g.: Who are we? #textbox)
- Description (e.g.: Here’s some important thing about us #textbox)
- Page URL – the page to redirect the user when she clicks on the image (eg.: /pages/about-us #dropdown)
There will be 3 featured images each containing 4 properties as it defined above. That is 12 properties altogether.
I want to make a nice options page to manage these images and their properties but that couldn’t be accomplished by using the standard Settings API functions (add_settings_field
) that generates a table like form. I don’t want 12 text boxes but rather than a nice UI where UI I can upload images, select pages (for the Page URL property) and even set the order of the images (best would be jquery.ui.sortable
).
How would you guys accomplish this scenario?
Based on what you want, if it were me, I would enable featured images and excerpts on pages and then build a widget to feature a page. Then put a sidebar on your homepage and use those widgets to reorder and select which pages to show in which order.
Then you’re managing all content related to a page on that page and your reordering experience is built for you via the widget interface. This is almost all using core features, so it would be pretty quick to implement.
Alternately, you could skip the widgets and use the menu_order and a custom taxonomy to select and order the pages to feature. The homepage would just use a custom query to grab and order the right pages while displaying the title, image, excerpt, and link.