Remove PAGE titles only

Community Forums Forums Design Tips and Tricks Remove PAGE titles only

This topic is: not resolved

This topic contains 12 replies, has 3 voices, and was last updated by  worldviewpr 1 year ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #57253

    worldviewpr
    Participant
    Post count: 48

    I’ve seen queries about removing post and page titles with the answer to use this snippet.

    remove_action('genesis_post_title', 'genesis_do_post_title');

    remove_action( 'genesis_entry_header', 'genesis_do_post_title' );

    BUT…I just want the title of PAGES removed from the Content. I don’t need ABOUT at top of its page when it’s already been clicked in the NAV menu. All I can find is solutions to remove titles from eveything posts and pages.

    http://redpark.wpengine.com
    #57258

    Susan
    Moderator
    Post count: 8702

    If you’re not opposed to a plugin, try the Genesis Title Toggle. It allows you to select on a per page basis.


    Susan @ Graphically Designing I’d love to customize your website! I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

    #57427

    worldviewpr
    Participant
    Post count: 48

    Hi Susan, thank you for the suggestion. No I don’t mind plugins as long as they make a difference for the site and don’t break anything<LOL>

    I have tried Genesis Title Toggle with mixed success. I did ask it to turn off titles in a page and it did, but as the page included a query for some posts, it also removed the headlines of those posts. Perhaps it’s wroth anopther look.

    I need something that can be more specific. I just want the PAGE names (titles) showing up only in the NAV menu, tnot their page content.

    #57437

    braddalton
    Participant
    Post count: 9332

    You can use PHP or CSS code.

    Modify the conditional tag and page i.d’s to fit your own site.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #57438

    worldviewpr
    Participant
    Post count: 48

    Interesting, thanks.

    Question, would I then enter the page IDs separated by commas in the$pages = array ( nnnnn,yyyyy ); to select the pages where I want that function to apply, yes?

    #57439

    worldviewpr
    Participant
    Post count: 48

    I saw the CSS to at

    http://wpsites.net/web-design/remove-titles-specific-conditions/

    Is CSS the better way to do that instead of using display none? (possible google ding for hiding content?)

    #57440

    braddalton
    Participant
    Post count: 9332

    That’s right.

    Or use CSS code:
    [css]
    .page .entry-title {
    display: none;
    }
    [/css]

    You could also use the page i.d’s using CSS:

    [css]
    .page-id-006 .entry-title,
    .page-id-007 .entry-title,
    .page-id-008 .entry-title,
    .page-id-009 .entry-title {
    display: none;
    }
    [/css]

    Note: This CSS code uses the new HTML 5 class selectors and not the old XHTML selectors.

    Both methods remove the title however both remove in the source code which is what the search engines scan.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #57443

    braddalton
    Participant
    Post count: 9332

    Correction: Remain in the source code.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #57444

    worldviewpr
    Participant
    Post count: 48

    The PHP did not work per http://redpark.wpengine.com/shop/

    SHOP stil appears in contetn. SO far on most of the pages I could select Blog Template because I was using a query arg

    but I am having no luck getting PHP to work, will try CSS and report

    add_action('get_header', 'wpsites_remove_page_titles');
    /**
    * Removes Page Titles Based on i.d's in an array
    * @author Brad Dalton - WP Sites
    * @example http://wpsites.net/web-design/remove-titles-specific-conditions/
    */
    function wpsites_remove_page_titles() {
    $pages = array( 13,159,59,15,16 );
    if ( is_page($pages) ) {
    remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    }
    }

    #57447

    worldviewpr
    Participant
    Post count: 48

    CSS did not work either per same URL

    http://redpark.wpengine.com/shop/

    .page-id-013 .entry-title,
    .page-id-159 .entry-title,
    .page-id-059 .entry-title,
    .page-id-015 .entry-title,
    .page-id-016 .entry-title {
    display: none;
    }

    It’s a mystery. Possible host blocking something?

    #57448

    braddalton
    Participant
    Post count: 9332

    Please read the note at the bottom of this thread.

    I tested the PHP code and it worked perfectly.

    Is your theme running HTML 5 or XHTML?

    I also tested the CSS as well.

    The CSS code also uses the new HTML 5 class selectors.

    Neither the PHP or CSS code will work on sites using the old XHTML markup.

    It only works on HTML 5 enabled sites


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #57449

    worldviewpr
    Participant
    Post count: 48

    I saw it work right on firefox so it must have been safari cache, even though I reset cache and restarted after it choked it still shows the page title. SO Iwill see if the php works, too again, thanks, but may just stick with the .css with html5 selectors

    #57450

    worldviewpr
    Participant
    Post count: 48

    Thanks so much, I’ve been pounding my head on a wall for days on this.

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

You must be logged in to reply to this topic.