I don't want "Home" to show up on Home page

So this might be just a matter of hacking the code correctly, but I have a website (dreamsuniversity.com) and I want there to be a "Home" showing up in the nav bar on the home page, however, I do not want "Home" showing up at the top of my page. (Please refer my site). When i delete the "Home" from the top of my page, it also disappears on the nav bar as well.

However, I want it to be on the nav bar but not in the Title of the page. Hope this makes sense :slight_smile:

Thank you in advance for your help.

  • aecnu
    • WP Unicorn

    Greetings jp,

    Thank you for being a WPMU Dev member!

    I visited your site and see the "Home" on your page (not the one in the nav bar) and that is the name of the post for your Home page, here is what the code is showing:

    <h1 xmlns="http://www.w3.org/1999/xhtml" class="post-title">Home</h1>

    This code is being rendered from approximately lines 31 and/or 38 of the Grid Market template index.php file - modify to your choice or remove home completely from between the two quotes.

    If this thread is not resolved because the suggested action did not work or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Cheers, Joe :slight_smile:

  • jp
    • Site Builder, Child of Zeus

    Joe,

    Thanks a ton for the timely response. However, I just checked the index.php template and that code is nowhere to be found :slight_frown: Was there a mistake on where this code is located?

  • aecnu
    • WP Unicorn

    Greetings jp,

    Thank you for being a WPMU Dev member!

    the code in my above post is what is being rendered on your home page causing "Hoem" to be displayed.

    The code you need to modify is in the Grid Market theme index.php lines 31 and 38:

    <h1 class="post-title"><?php _e( 'Home', 'framemarket' ) ?></h1>
    						<div id="mp-product-grid">
    							<?php framemarket_grid_mp_list_products();?>
    							<div class="clear"></div>
    						</div>
    				<?php } ?>
    	<?php } else {?>
    		<h1 class="post-title"><?php _e( 'Home', 'framemarket' ) ?></h1>

    Change Home as shown above to what you choose or remove it complete from in between the two quotes.

    If this thread is not resolved because the suggested action did not work or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Cheers, Joe :slight_smile:

  • jp
    • Site Builder, Child of Zeus

    Lol I have no idea what's going on but I am not seeing what you are seeing here. I am seeing:

    <h1 class="post-title"><?php _e( 'Our products', 'framemarket' ) ?></h1>
    <div id="mp-product-grid">

    and I am checking the code using the WP control panel "editor". This is what you want me to do, right? So confused right now, it's probably me, but I don't know what to say.

  • camparoo
    • Site Builder, Child of Zeus

    I have had similar problems in removing 'home'. While display: none; didn't work for me at all, this did.

    .home h1.post-title {
    width: 0px;
    height: 0px;
    }

    Also, I have been working in the theme Thesis (so I don't know how much help this will be for you), but adding this to my functions.php page eliminated my home page title.

    function suppress_title() {
    return (is_page(home)) ? false : true;
    }
    add_filter('thesis_show_headline_area', 'suppress_title');

    This second example created an array of pages to exclude titles, so I was able to exclude page titles to multiple pages.

    function suppress_title() {
    return (is_page(array('home','core-values'))) ? false : true;
    }
    add_filter('thesis_show_headline_area', 'suppress_title');

    If your Theme doesn't include hooks and such, functions.php really wants an if/else statement.

    Best of luck!

  • Han
    • The Crimson Coder

    The theme doesn't have those filters unfortunately.
    If you want to remove the title instead of hide it,
    - create a new file called "content-page.php" and put it in gridmarket folder
    - copy paste this code

    <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    				<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    					<?php if ( !is_front_page() ) { ?>
    						<h1 class="post-title"><?php the_title(); ?></h1>
    					<?php } ?>
    					<div class="post-content">
    						<?php the_content(); ?>
    
    						<div class="clear"></div>
    						<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'framemarket'), 'after' => '</div>' ) ); ?>
    						<?php edit_post_link( __( 'Edit', 'framemarket'), '<span class="edit-link">', '</span>' ); ?>
    					</div>
    				</div>
    				<?php comments_template( '', true ); ?>
    <?php endwhile; ?>

    Hope that helps :slight_smile:

  • jp
    • Site Builder, Child of Zeus

    Riyaku...I did exactly what you said, but it did not work. I attached the screenshot to show people what the result was.

    Thank you very much for your help, though. Appreciate it.

    Anyone else want to take a stab at this??? 0/4. Just trying to hide title on my home page.

  • camparoo
    • Site Builder, Child of Zeus

    Oh, dugh. I can't believe I didn't think of this before...

    Create your menu in the WordPress Dashboard under Appearance > Menus
    This site has a nice video tutorial on using this feature if you need a bit of info how-to...

    Set up all of your pages in your menu. Each 'page' you put in the menu will have a nice arrow on the far right-hand side of the bar graphic. Click on the arrow for the 'home' page to open an area where you can add the text you want to see on the navigation bar.

    This way, your page itself can be 'nameless' but still work correctly in the nav bar.
    Also, you could choose instead to create a custom link. Just call it 'home' and give it your url.

    Either way, making your menu this way will let you keep 'Home' off your home page.

  • jp
    • Site Builder, Child of Zeus

    Camparoo...great idea, but it still didn't work...ugh.

    In my settings it turned out it was already "nameless"....

    Anyone else want to crack at this?

    Mad reputation points to the person who figures this one out!!!

  • camparoo
    • Site Builder, Child of Zeus

    If you add this code to your functions page:

    add_filter( 'the_title', 'remove_page_title', 10, 2 );
    
    function remove_page_title( $title, $id ) {
        if( '4' == $id ) return '';
    
        return $title;
    }

    And then figure out what page number home is by going into the WordPress Dashboard, go to pages, and roll over the click-able name for your Home page, you'll be able to get a link (in Firefox this link is visible at the bottom left of the browser window) that looks something like
    http://yourdomain.com/wp-admin/post.php?post=4&action=edit

    In my example, post=4 means that my page is #4.

    The ONLY number you'll need to change in this example is 4.
    I'm crossing my fingers that this will do it! :o)

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.