• Hi –

    I am testing a new theme on local host. The theme uses the same pages as the original website, but when I go to admin > pages the pages do not show up.

    How do I publish pages that are in the theme without rebuilding them through the “add new” function?

    thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Pages are not in a theme…. page templates are….

    page templates can be assigned to pages therogh the ‘add new’

    Thread Starter lia_leaves

    (@lia_leaves)

    that’s the problem, the page templates are not showing up in the “add new” drop down menu. The templates have already been designed, now I need to assign them to pages.

    sorry, I wrote pages in the theme, I meant page templates in the theme!

    Oh, so once you get to the add new screen, the page attributes dropdown does not have your templates?

    Are your page template headers all proper looking like this?

    <?php
    /*
    Template Name: Page
    */
    ?>

    (sorry if this is basic…gotta check the simple first)

    Thread Starter lia_leaves

    (@lia_leaves)

    I’ll check. I did not create these templates so am still getting used to what I”m working with.

    the “page” page does not have the template name header yet that is the page that is being shown. Is that because WP looks for “page.php” first? What about index?

    I’m creating a static main page – should it be “index”?

    https://codex.www.ads-software.com/Template_Hierarchy

    Now you are confusing me a bit! lol. How familiar are you with the heirarchy? Certain templates are assigned to certain things.

    index.php handles the blog post index normally
    page.php handles individual pages

    custom page templates appear in that dropdown to be applied to pages. Nothing other than page.php and custom page templates with the above code can be applied to pages through the dropdown.

    other templates like single.php, archive.php, etc all have specific uses.

    For a static main page, you could make a page template, then create the page (add new), assign the template to the page, and then set the page as the static front page

    or, certain templates (home.php is one I believe) will automatically be used as front page. Check the heirarchy page for more specifics on that

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Template pages not showing up on test site’ is closed to new replies.