• kharmer

    (@kristianharmer)


    Hi all,

    Creating a slide based site for a client; I would like to load all pages (defined from main menu) into one view and wrap each page in the slide element.

    How would one go about including the pages specific layout template at the same time (obviously not including the header and footer each time)?

    TIA…

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    The page’s template file is saved in post meta under the key “_wp_page_template”. You can include or require the file from other templates, or use get_template_part(). If there is no meta value, the default template is used, usually page.php.

    Page templates expect the page’s query to already be instantiated. You can do so on your main template, assigning the new WP_Query object to the global $wp_query variable, which the page template will use to drive its loop.

    Thread Starter kharmer

    (@kristianharmer)

    @bcworkz thanks for your feedback on this, I will give it a go.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show multiple pages in one view, each with own format’ is closed to new replies.