Forum

Thread tagged as: Problem, Meta

Title not pulling through on added pages

I have added a Sitemap page to my site which has no perch_content() in it, just perch_pages_navigation() so I have added the page to the admin panel manually. On the Sitemap page I include the following code:

<?php
    if (perch_layout_has('blog-post')) {
        perch_blog_post_meta(perch_get('s'));
    } else {
        echo "<title>";
        perch_pages_title();
        echo "</title>";
    }
?>

The problem is that perch_pages_title() is not displaying the title I have set in the admin panel. What am I doing wrong?

Thanks, Mike.

Mike Harrison

Mike Harrison 0 points

  • 5 years ago

Worked it out - I hadn't included index.php in the filepath in the perch admin - I was using /sitemap/ instead of /sitemap/index.php