Forums

Included Sub Pages Template (6 posts)

  1. eyemade
    Member
    Posted 1 year ago #

    Hey there

    Is there any way to use a sub page's own template when its included in a parent page?
    For example, I have a parent page with this snippet:

    CULTURE
    [include-page id="73"]
    
    TEAM
    [include-page id="75"]

    So this two sub pages are shown in my parent page. But they use the template from the parent page and not their own. Any way to change this?

  2. Chip Bennett
    Member
    Posted 1 year ago #

    What Plugin (or custom code) are you using to define the [include] shortcode?

  3. eyemade
    Member
    Posted 1 year ago #

    Uff, I've forgot there's a plugin behind.
    It's the Improved Include Page Plugin.

    Or do you have any other suggestions or solutions for this?

  4. Chip Bennett
    Member
    Posted 1 year ago #

    I'll take a look at the Plugin.

    However, it is extremely doubtful that you'll be able to pull in a Page template file from within another Page template file, because properly formed Page template files are fully-formed HTML, rather than merely a template-part file.

  5. eyemade
    Member
    Posted 1 year ago #

    Of course. I kept that in mind. I want to add a query with a list of posts from custom types in my sub page. So it seems the only one way to set up a template for the subpage with the php snipped for the query. Or is there a way to include WordPress php queries/snippets inside the sub page without creating a template?

  6. eyemade
    Member
    Posted 1 year ago #

    Chosen another way and added a plugin for executing php inside a page. So my problem is solved. Thanks anyway Chip.

Topic Closed

This topic has been closed to new replies.

About this Topic