Removing page titles from wordpress header

3 replies
  • WEB DESIGN
  • |
Hi

I'm hoping some warriors can help me out here. As you know, when you create new pages in wp, the page title automatically appears next to the home title, so if you added about, privacy, contact us etc - your header and footer would show home about privacy contact us

How do you go about removing any of these titles if you don't want them to show eg. if you just wanted to leave the home and about pages (and still link out to the correct page).

In trying to find the solution, I came across a post online where you can go to the page.php section in wp and remove the h2 tag. That will remove all the titles but I want the option of removing any title in the header and just leave all page titles in the footer.

I also played around with header.php - removed the line
HTML Code:
<li><?php wp_list_pages('title_li='); ?></li>
and then copied the line
HTML Code:
<li><a href="<?php echo get_option('home'); ?>">Home</a></li
to include the appropriate title by substituting 'home' but then it doesn't link to the correct page, just stays on the home page.

Any solutions would be most welcome, thanks.
#header #page #removing #titles #wordpress
  • Profile picture of the author wfcheapseo
    Hi,
    You should have use this sort of code in header.php

    PHP Code:
     <?php wp_list_pages('include=7,13&title_li='); ?>
    Put your page ids instead of 7,13

    Hope it will work for you.

    Thanks
    Monzu
    {{ DiscussionBoard.errors[4369841].message }}
    • Profile picture of the author larkykid
      Originally Posted by wfcheapseo View Post

      Hi,
      You should have use this sort of code in header.php

      PHP Code:
       <?php wp_list_pages('include=7,13&title_li='); ?>
      Put your page ids instead of 7,13

      Hope it will work for you.

      Thanks
      Monzu

      Worked perfect my man!

      Thanks for your help
      {{ DiscussionBoard.errors[4373589].message }}
  • Profile picture of the author wfcheapseo
    Glad to know that it worked for you.

    Thanks
    Monzu
    {{ DiscussionBoard.errors[4373633].message }}

Trending Topics