I thought this might help somebody as it took me a while to figure out. Suggestions on how to improve the code would be welcome.
Have you ever wanted to create a sublevel landing page that displays a gallery menu of its child pages as well as a few other arbitrary pages that you specify? This code will output the thumbnail as link, title as a link and short description text, arranged in 4 columns.
- Create a page template using the code below.
- Create a page using the template
- If required, add a custom field to your page called “include_pages” where you can list some extra page IDs you would like to output.
- In each page that you intend to output, create a custom field called “page-desc” and add some short introduction text.
- Create css styles for “gallery” to size and wrap the list, “image-wrap” to size the image, “four_columns” to size the columns, “excerpt”, “h2” and “nomargin” for the final item.
You could amend the template to exclude certain child pages by creating an “exclude_pages” custom field and extracting those values from the merged pages array.
Posts like that tend to get lost a support thread. Have you considered creating a Codex article and posting that there?
It’s not really difficult to do and howto articles really do belong there.
See, that’s the problem with posting code here, there’s that pesky “don’t post more than 10 lines” rule. 😉
Follow that link I provided which also has http://codex.wordpress.org/Codex:Guidelines and use the existing articles as examples.
- The topic ‘Sublevel landing page – gallery menu of pages’ is closed to new replies.