• 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?

Viewing 5 replies - 1 through 5 (of 5 total)
  • What Plugin (or custom code) are you using to define the [include] shortcode?

    Thread Starter René Stalder

    (@eyemade)

    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?

    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.

    Thread Starter René Stalder

    (@eyemade)

    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?

    Thread Starter René Stalder

    (@eyemade)

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Included Sub Pages Template’ is closed to new replies.