WordPress.org

Support

Support » Themes and Templates » [Resolved] Hide specific page title on twentyten theme

[Resolved] Hide specific page title on twentyten theme

  • on my site, I’d like to hide the page title on the main page…. I tried adding this to childtheme:

    .parent-pageid-415 #content .entry-title {
    display: none;
    }

    with no avail. Any ideas?

Viewing 15 replies - 1 through 15 (of 16 total)
  • Moderator Michael

    @alchymyth

    Forum Moderator

    imho, there is no css class .parent-pageid-415 on that page;

    there is a body class .page-id-415 and a post class .post-415

    are you talking about the ‘Welcome to Oakland Structures’ title?

    ummm, yes!

    I am currently working on adding a sliced photoshop file to that page, so it may look a little weird at time of this writing

    Chip Bennett

    @chipbennett

    Theme Review Admin

    First: you need to use .page-id-415, rather than .parent-pageid-415.

    Second: you’re probably better off targeting body.home, rather than body.page-id-415.

    That worked Chip, thank you.

    well, the first one, so, I guess does it matter the method of your 2 suggestions?

    Chip Bennett

    @chipbennett

    Theme Review Admin

    It only matters if the Page ID changes, which could happen if you use a different Static Page as your front page, or perhaps if you had to restore from backup, and the Pages got assigned different IDs in the database.

    Using body.home is also more semantic, as it better explains where/why you want the Page Title not to display. So, it will be easier to understand/follow in the future, when you (or someone helping you?) might not remember why body.page-id-415 has its Title set not to display.

    That makes sense,

    How would I implement that instead of:

    }
    .page-id-415 #content .entry-title {
    display: none;

    like this?:

    }
    .body.home #content .entry-title {
    display: none;
    Chip Bennett

    @chipbennett

    Theme Review Admin

    That should work, yes – except body is a tag, not a class:

    body.home #content .entry-title {
         display: none;
    }

    actually, this worked:

    }
    body.home #content .entry-title {
        display: none;

    Thank you very much!!!

    Chip Bennett

    @chipbennett

    Theme Review Admin

    Glad to help, and glad you got it working!

    (p.s. be sure to mark the Topic as “Resolved”.)

    How do I find the page ID numbers?

    I use the plugin Reveal IDs for WP Admin
    It works great!

    Moderator Michael

    @alchymyth

    Forum Moderator

    in the dashboard – in the ‘posts’ page –
    when you hover over the post name, you get the permalink in the address window at the bottom of the browser;
    something like:

    yoursiteurl/wp-admin/post.php?post=1234&action=edit

    where this number 1234 is the post ID.

    esmi

    @esmi

    Forum Moderator

    Okay, I just found an amazing solution. I called a programmer friend and he had a solution that WORKS.

    Open the “loop-page.php” file in the theme. In the code that says:

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

    Remove (or comment out):
    <h2 class="entry-title"><?php the_title(); ?></h2>

    BINGO!….. title for the Home page (or entry page) is gone from the page, but remains in the navigation.

    does anyone know what are the effects on SEO when you hide specific page titles? ta.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Resolved] Hide specific page title on twentyten theme’ is closed to new replies.