Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter nmarengo

    (@nmarengo)

    @metaprinter Specialized Page Template are for ONE page only, Custom Page Templates – which is what im doing – is a template for ANY pages.

    Im trying to do things “by the book” and not patching things or having to make the same template page (specialized page template) for many pages, thats not DRY at all.

    Your second option (using template calls) is what im doing at the moment to get around the problem. Using get_template_part.

    But as i said, im trying to do things properly and this seems like a bug to me. An assigned template not being displayed on many pages because they have a parent assigned to them. The moment you unassigned the parent, all those pages show the custom template. Nothing on the documentation explains that child pages are not allowed to be assigned a custom template.

    Thread Starter nmarengo

    (@nmarengo)

    @metaprinter – your suggestion goes against wordpress reference

    (Don’t use page- prefix as WordPress will interpret the file as a specialized page template.)

    Thread Starter nmarengo

    (@nmarengo)

    Nothing happens if i deactivate all plugins. In fact, i hardly got any plugins other than the WP Admin removal bar.

    the filename is template_insurance-products-page.php

    The first few lines of the file is

    <?php
    /*
    Template Name: Insurance Products Page
    */

    The page is located in the root of my theme, so next to functions.php, style.css, front-page.php, my other templates, etc.

    The issue only appears when the page is a child of another page. Even when its a child, you can select the template on the admin panel, it just doesnt display it. So the only change needed to see the template is to remove the parent association as the template is already selected and saved on the database.

Viewing 3 replies - 1 through 3 (of 3 total)