• Resolved La M

    (@lady_moocher)


    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.

    Instructions:

    1. Create a page template using the code below.
    2. Create a page using the template
    3. 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.
    4. In each page that you intend to output, create a custom field called “page-desc” and add some short introduction text.
    5. 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.

    Other ideas:
    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.

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sublevel landing page – gallery menu of pages’ is closed to new replies.