Is there a Way to Replace a Page H1 Title with a DIV?

Community Forums Forums Design Tips and Tricks Is there a Way to Replace a Page H1 Title with a DIV?

This topic is: not resolved

Tagged: , ,

This topic contains 3 replies, has 2 voices, and was last updated by  eluviis 1 year, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #24235

    eluviis
    Participant
    Post count: 115

    Is there a Way to Replace a Page H1 Title?

    Basically, what if you want to name a page, but have it not display its title or have the title be wrapped in H1 tags? That way, you can display some custom text wrapped in a div and h1 at the top of the page/post?

    To give you an idea of what I’m trying to do, look at the Studiopress 101 page here: http://www.studiopress.com/get-started

    Notice how “We’re Studiopress” is wrapped in a div and H1′s. That’s easy to do, but how do I stop the title of the page to show in the post wrapped it it’s own set of H1′s. (assuming the name of the page is “about” or “start” or whatever.

    I’m doing this on only 1 or 2 pages of the entire site by the way.

    #24480

    nglstudios
    Participant
    Post count: 13

    I have the exact same question.

    It will be great to remove that title from showing when is a page.

    #24482

    nglstudios
    Participant
    Post count: 13

    I found the answer that was provided by Brian Bourn; simply copy/paste the following code to your “functions.php” file on your child theme:

    //***Remove Page Titles From All Pages Except Blog Page Template**/
    add_action( ‘get_header’, ‘bourncreative_remove_page_titles’ );
    function bourncreative_remove_page_titles() {
    if ( is_page() && ! is_page_template( ‘page_blog.php’ ) )
    remove_action( ‘genesis_post_title’, ‘genesis_do_post_title’ );
    }

    #24504

    eluviis
    Participant
    Post count: 115

    Hmmm. I’ll give it a try, thanks. I do however, want to hide the title ONLY on 1 page (it’s an about page). But I should be able to modify that code with a page ID so that it only affects that one page. I’ll try it and report back. Thanks, Danny

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.