• Using WP 3.0 out of the box.

    I want to remove the Page Titles from the pages. I’ve tried commenting out code in page.php like other posts suggest but no luck.

    I want to remove the page titles ‘Home’ and ‘About’ from these pages.

    Please tell me exactly which lines of code to comment out.
    Thanks,
    Lynn

Viewing 14 replies - 1 through 14 (of 14 total)
  • Are you referring to the page titles in the browser title bar?

    Thread Starter lsalter

    (@lsalter)

    The page titles on the pages themselves that are the same as you enter into the Page Title field.
    I want to get rid of the word ‘Home’ on my page:
    https://67.20.69.240/~machinf5/

    Thanks!

    If you mean the navigation, you can try something like:

    $page = get_page_by_title('Home');
    wp_list_pages('exclude='.$page->ID);
    Thread Starter lsalter

    (@lsalter)

    No, not the navigation.
    On the PAGE itself. See the big Home standing out like a sore thumb?
    https://machineexpert.com/
    Again, the page itself where it repeats the page title you enter when you create a page.

    Oh, ok. To remove that all you need to do is edit your page.php file and remove the following line:
    <h1 class="title"><?php the_title(); ?></h1>

    Thread Starter lsalter

    (@lsalter)

    That didn’t remove it.
    I just commented this line out v. deleting it entirely. Here’s the code from my page.php. I just commented out the line of code you said, right? What am I doing wrong?

    <?php if ( is_front_page() ) { ?>
    /***
    Lynn removed this code to eliminate Home on the page
    <h2 class=”entry-title”>
    <?php the_title(); ?>></h2
    ***/
    <?php } else { ?>

    <h1 class=”entry-title”>

    If you are going to comment it out, the comment should look like:

    <?php //the_title(); ?>

    Thread Starter lsalter

    (@lsalter)

    Well it is still there. So I have copied the 5 lines from my page.php here. Please modify the lines below, commenting out what I don’t want in order to remove just the Home page title from displaying please.

    <?php if ( is_front_page() ) { ?>

    <h2 class=”entry-title”>
    <?php the_title(); ?>></h2

    <?php } else { ?>
    <h1 class=”entry-title”>

    Thanks,
    Lynn

    Did you create the page in question as a page? Or a post? If it is a page the code should look like this:

    <?php if ( is_front_page() ) { ?>
    <h2 class="entry-title"><?php //the_title(); ?></h2>
    <?php } else { ?>
    <h1 class="entry-title"><?php //the_title(); ?></h1>
    <?php } ?>

    After looking at the source code view of your home page it looks like you are using the onecolumn-page.php file for the page. Edit this page and look for:

    <h1 class="entry-title"><?php the_title(); ?></h1>

    and change it to:

    <h1 class="entry-title"><?php //the_title(); ?></h1>

    Thread Starter lsalter

    (@lsalter)

    That worked.
    Sorry I didn’t know to tell you I was using a different page for the Home page (front page) than all the rest.

    Do you know of a way to reduce the amount of blank space from just under the navigation bar to the page title? I’m assuming this may be across all pages (regardless of which template I use). On the Home page especially it is a log of wasted space. I think I could reduce the amount of space between 1/4″ and 3/8″. The widget in the sidebar actually appears closer to the bottom of the navigation bar than the page titles. Could be 1/2″ for just the page side (not the sidebar).

    Thanks again for sticking with me.
    Lynn

    In your CSS file you could try changing:

    #container {
    	float: left;
    	margin: 0 -240px 0 0;
    	width: 100%;
    }
    '
    to:

    #container {
    float: left;
    margin: -10px -240px 0 0;
    width: 100%;
    }
    `
    If the ‘-10px’ is not enough, just keep adjusting it until it lines up where you want it to.

    Hi DigitalMcGrath,

    I’m having the exact same issue with removing my page titles as lsalter had. I removed: <h1 class=”title”><?php the_title(); ?></h1> from where I’ve ** below, but my page titles are still showing.

    <?php get_header();?>
    <div class=”grid_11″>

    <div class=”entry”>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    **
    <?php the_content(__(‘Read more’));?>

    <?php endwhile; else: ?>
    <h1>Not Found</h1>
    <p>Sorry…but the content you’re looking for is not here.</p>
    <?php get_search_form(); ?>
    <?php endif; ?>
    <div class=”clear”></div>
    </div><!– end of entry –>

    </div>

    I am using a 3-column template, so that might have something to do with it, but I can’t find where to edit the template. Help please.

    Using wpa-storefront theme.
    ensellopedia.com

    P.S. that code is from my page.php file in my theme folder.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Remove Page Titles’ is closed to new replies.