0

I’m pretty sure this can be done with a filter or some kind of find and replace, but I’m not sure how.

I have a page called “Home” like so:

Screenshot

When the link is displayed in my template it says “Home”. I’d like it to say “About Us”.

I want the user to know which page the homepage is in the Page Overview panel, but I’d like to be able to name it whatever I like in my template without displaying the word "Home". Any ideas?

  • Is this page assigned to be static home page via settings or something? – Rarst Oct 30 '11 at 21:05
  • Rarst, yes the homepage is static...sorry for the late reply, just saw your comment...I found a solution, which I posted below :) – Josh Rodgers Apr 27 '12 at 14:49
2

What I did was really simple...In the admin panel I left the name as home, then I used conditional statements to change the name.

For the navigation I used:

<ul>
    <li <?php if ( is_home() ) { ?>class="current_page_item"<?php } ?>><a href="<?php bloginfo('url') ?>">About Us</a></li>
    <?php $args = array("exclude" => "".page_name('Homepage').", "title_li"  => ""); wp_list_pages( $args ); ?>
</ul>

For the title I used:

<?php if ( is_home() ) { ?>
    <h2>About Us</h2>
<?php } else { ?>
    <h2><?php the_title(); ?></h2>
<?php } ?>

I'm sure there are other ways to do this, but this is how I was able to solve it!! Hope this helps someone :)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.