How to change post page title
-
Hey there. I have a page on my website that I don’t want to appear in the main navigation menu at the top of the page. However, my theme doesn’t natively support menus, so I’m looking for alternative means to exclude it. I tried by making it “private.” The only problem with this is that when people navigate to it the title says: “Private: New Car Smell.” I want to remove the “Private” part from it (no pun intended hehe).
I’m thinking the code I’ll have to edit is in the page.php file,
<h2 class="post_page_title"><?php the_title(); ?></h2>
and maybe in the functions.php file ` // Query pages.
$pages = get_pages($r);if ( !empty($pages) ) {
for($i=0;$i<count($pages);$i++)
{
$class=”;
if(is_page($pages[$i]->post_title))
$class=’ class=”select” ‘;
$output .='<li>|</li><li><a ‘.$class.’ href=”‘.get_page_link($pages[$i]->ID).'”><span>’.$pages[$i]->post_title.'</span></a></li>’;
if($limit!=NULL)
{
break;
}
}`But, since I’m not a php programmer (yet) I’m at a loss.
Here is the website: https://www.stuandthegurus.com/?page_id=126
Any help would be highly appreciated. Thanks.
- The topic ‘How to change post page title’ is closed to new replies.