WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] No Title on Static Home Page (23 posts)

  1. bamosherjr
    Member
    Posted 7 years ago #

    Http://www.hilltopbc.com

    I am trying to have this home page not display a title. If I do not include a title, it does not show up in my sitemaps, or on the page list, and it makes a funny little rollover in my widget sidebar. How do I make it so that the page has an actual title, but so that it does not display the title on the actual page?

    I want the page to have an actual title in the dashboard, but when displaying it on the web for viewers, I do not want the word Home there. Can you please help!

  2. jugularbean
    Member
    Posted 7 years ago #

    What you can do is go to your page template file (presentation->theme editor) and look for a line that has the code
    the_title();

    and replace it by
    if (!is_page(home))
    the_title();

  3. bamosherjr
    Member
    Posted 7 years ago #

    I put that into place, and it like killed my whole theme. I am not sure why? Is there a way we can IM somehow, I need to get this done for the client and soon. Please let me know.

  4. bamosherjr
    Member
    Posted 7 years ago #

    <?php if (!is_page(home)) ?>
    <div class="article_title"><?php the_title(); ?></div>
    <?php endif; ?>

    This is what I have in place.

  5. jugularbean
    Member
    Posted 7 years ago #

    You missed a colon

    <?php if (!is_page(home)): ?>

  6. bamosherjr
    Member
    Posted 7 years ago #

    <?php if (!is_page(home)); ?>
    <div class="article_title"><?php the_title(); ?></div>
    <?php endif; ?>

    Still not working.

  7. jugularbean
    Member
    Posted 7 years ago #

    not a semi-colon...a colon
    :

    copy paste from my code above

  8. bamosherjr
    Member
    Posted 7 years ago #

    <?php if (!is_page(home)): ?>
    <div class="article_title"><?php the_title(); ?></div>
    <?php endif; ?>

    This is in place, and still comes up with the title. I am new at PHP and am not sure how all this works.

  9. jugularbean
    Member
    Posted 7 years ago #

    Are you using WP 2.2?

    cause if you are not then you have to use

    <?php if (!is_home()): ?>
    <div class="article_title"><?php the_title(); ?></div>
    <?php endif; ?>

  10. bamosherjr
    Member
    Posted 7 years ago #

    I am using wordpress 2.2. I have copy pasted the code you gave me above and have put it in both leftside.php, and leftside_page.php. I am still getting the title.

  11. jugularbean
    Member
    Posted 7 years ago #

    leftside.php and leftside_page.php???

    are these templates you are using for your home page?

  12. bamosherjr
    Member
    Posted 7 years ago #

    those files are templates that i am using across the page. It is what displays the left side of the page. My index.html for my theme looks like this:

    <?php get_header(); ?>
    <?php include (TEMPLATEPATH . '/leftside.php'); ?>
    <?php include (TEMPLATEPATH . '/rightside.php'); ?>
    <?php get_footer(); ?>

    They are just a theme file.

  13. jugularbean
    Member
    Posted 7 years ago #

    So you don't have any file title page.php in your template list?

  14. moshu
    Member
    Posted 7 years ago #

    1. It is index.php not .html
    2. It would be nice if you could explain clearly what you want.
    3. Do you want to exclude "Home" form being listed on the right sidebar??

  15. bamosherjr
    Member
    Posted 7 years ago #

    no i don't should i?

  16. jugularbean
    Member
    Posted 7 years ago #

    Well ideally a WP Page uses the page.php template, but if that doesn't exist it'll use the index.php template.

    So if you don't have a page.php then ideally any changes you make to the index.php will be applicable for pages as well.

    If the code changes you made aren't helping, I'm not really sure what the issue is.

    @moshu - he's using a static page for his front page and he's trying to ensure that the title doesn't display

  17. moshu
    Member
    Posted 7 years ago #

    @jugularbean,
    Need more coffee...

    However, OP doesn't read carefully: you stated clearly in your first reply:
    go to your page template file

  18. bamosherjr
    Member
    Posted 7 years ago #

    I now have a page.php, but the title is still showing up. I have figured out how to get rid of the sidebar problem (well when not using a widget sidebar). I need the title to not display on the left hand side.

  19. bamosherjr
    Member
    Posted 7 years ago #

    I have to run out and pick up my moving truck. Hope to be back in about an hour. Please do not leave my hanging. You can IM me on AIM at bamjrdesigns. I will be back shortly. Thank you.

  20. bamosherjr
    Member
    Posted 7 years ago #

    Okay, I am back, but am still not getting the right display. http://www.hilltopbc.com

    Is there anymore ideas?

  21. bamosherjr
    Member
    Posted 7 years ago #

    I have added:

    <?php if (!is_home()): ?>
         <div class="article_title"><?php the_title(); ?></div>
    <?php endif; ?>

    To my page file. But I am still not getting the display that I want. Is this not the right code? and if not what exactly do I need to put?

  22. bamosherjr
    Member
    Posted 7 years ago #

    Did some research and got it on my own. The reason the is_home function does not work is beacuase it was depricated in wordpress v2.0. Instead you have to use this:

    <?php if (!(is_page('20'))): ?>
         <div class="article_title"><?php the_title(); ?></div>
    <?php endif; ?>

    It looks great and works! I am closing this thread now!

  23. charmed
    Member
    Posted 6 years ago #

    You can also use is_page('home') if the slug name of your page is 'home'.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.