Need help? Check out our Support site, then

help with <h1> other than the_title please

  1. Hi

    This is my first installation of wordpress and also my first post for support on this forum.

    I'm creating a small site and using WordPress as a basic CMS which so far has gone well.

    I have created some pages - homepage, about, sevices, contact etc - that use the title of the page as the link in the nav list and also the <h1> on the page.

    However I want the home page to write 'Home' in the nav list - which is working fine - but 'Widgets' (for example) as the <h1>, so have called the title of the page 'Home' and written this code:

    <h1><?php if (the_title('Home')) {
    echo 'Widgets';
    } else ( the_title() )
    ?></h1>I also wrote

    if (the_title() =='Home')

    I was hoping this would mean that if the title of the page is 'Home' then it would write the <h1> as 'Widgets' and for any of the other pages then the <h1> would write its title....

    But lo and behold his isn't working! What I'm getting is the <h1> tags are writing 'HomeHomeHome' or 'HomeAboutAbout' etc depending on what page you are on.

    ...this no doubt is when you're thinking - well of course they are!

    And that is why your help with this would be appreciated!


  2. You need to be asking at, as we here at are running different software and won't be able to help you.

  3. Apologies. Thanks for your reply raincoaster.

Topic Closed

This topic has been closed to new replies.

About this Topic