• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Titles on Posts not pages

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Titles on Posts not pages

This topic is: not resolved
  • This topic has 11 replies, 3 voices, and was last updated 11 years, 9 months ago by Summer.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • July 9, 2014 at 7:53 pm #113666
    RoxG
    Member

    I have the app title toggle but its not working out because I'm trying To remove titles on Page not Posts. any suggestions on a different app or coding?

    http://www.roxineolivia.com
    July 9, 2014 at 9:23 pm #113677
    DTHkelly
    Member

    Add plugin support for page (as a custom post type) in functions.php?

    Related: http://wpsites.net/best-plugins/add-custom-post-type-support-to-genesis-simple-menus-plugin/

    But the Genesis Title Toggle plugin suggests a different method

    Finally, if you're comfortable with code you can use the be_title_toggle_post_types filter to change the post types this applies to (it only applies to pages by default).

    Perhaps Bill Erickson's site provides the code for the above?

    July 9, 2014 at 9:33 pm #113680
    DTHkelly
    Member

    https://wordpress.org/plugins/genesis-title-toggle/ works on pages (not posts). So it should work on pages (I misread your thread, sorry).

    July 10, 2014 at 9:20 am #113770
    DTHkelly
    Member

    I found the applicable code limiting Genesis Title Toggle to pages [lines 61-66 in genesis-title-toggle.php:

    	function setting_defaults( $defaults ) {
    		$post_types = apply_filters( 'be_title_toggle_post_types', array( 'page' ) );
    		foreach ( $post_types as $post_type )
    			$defaults[] = array( 'be_title_toggle_' . $post_type => '' );
    		return $defaults;
    	}

    The $post_types array needs to include , 'post' as well as page.

    Also lines 73-80:

    	function sanitization() {
    		$fields = array();
    		$post_types = apply_filters( 'be_title_toggle_post_types', array( 'page' ) );
    		foreach ( $post_types as $post_type )
    			$fields[] = 'be_title_toggle_' . $post_type;
    			
    	    genesis_add_option_filter( 'one_zero', GENESIS_SETTINGS_FIELD, $fields );	
    	}

    Lines 98-104:

    	function create_sitewide_metabox() {
    		$post_types = apply_filters( 'be_title_toggle_post_types', array( 'page' ) );
    		foreach ( $post_types as $post_type )
    			echo '<p><input type="checkbox" name="' . GENESIS_SETTINGS_FIELD . '[be_title_toggle_' . $post_type . ']" id="' . GENESIS_SETTINGS_FIELD . '[be_title_toggle_' . $post_type . ']" value="1" ' . checked( 1, genesis_get_option( 'be_title_toggle_' . $post_type ), false ) .' /> <label for="' . GENESIS_SETTINGS_FIELD . '[be_title_toggle_' . $post_type . ']"> ' . sprintf( __( 'By default, remove titles in the <strong>%s</strong> post type.', 'genesis-title-toggle' ), $post_type ) .'</label></p>';
    
    	
    	}

    Lines 125-132:

    		$show = array();
    		$hide = array();
    		$post_types = apply_filters( 'be_title_toggle_post_types', array( 'page' ) );
    		foreach ( $post_types as $post_type ) {
    			$default = genesis_get_option( 'be_title_toggle_' . $post_type );
    			if ( !empty( $default ) ) $show[] = $post_type;
    			else $hide[] = $post_type;
    		}

    Lines 178-183

    	function initialize_cmb_meta_boxes() {
    		$post_types = apply_filters( 'be_title_toggle_post_types', array( 'page' ) );
    	    if ( !class_exists('cmb_Meta_Box') && !empty( $post_types ) ) {
    	        require_once( dirname( __FILE__) . '/lib/metabox/init.php' );
    	    }
    	}
    July 10, 2014 at 5:33 pm #113834
    RoxG
    Member

    So for the first one I'd have the below?

    function setting_defaults( $defaults ) {
    $post_types = apply_filters( 'be_title_toggle_post_types', array( 'page' , 'post') );
    foreach ( $post_types as $post_type )
    $defaults[] = array( 'be_title_toggle_' . $post_type => '' );
    return $defaults;
    }

    July 10, 2014 at 5:38 pm #113837
    RoxG
    Member

    Just to clarify, when I turn it on, it is removing the title on both my pages and the posts on the blog page (the list of posts on the page). http://www.roxineolivia.com/success-blog

    What I want is the title removed from the pages, but on the posts listed on the blog page, I want the titles to show.

    Roxine

    July 10, 2014 at 5:59 pm #113838
    DTHkelly
    Member

    Site looks great - you picked a terrific childtheme!

    I thought this plugin included a metabox to let you choose on a per page/post basis whether to "toggle" the title (keep/remove). (I don't use it.)

    For individual pages, you want the title removed. (standard for this plugin)

    For individual posts, you also want the title removed? -

    And for Blog page, archiving posts, you want the post titles to show? If so, for the Blog page you may need a custom loop if this plugin is removing those titles as well..

    Example:http://sridharkatakam.com/show-post-titles-category-pages-genesis/

    July 10, 2014 at 6:19 pm #113843
    DTHkelly
    Member

    Or perhaps an easier way to re-create a blog/archive page:
    http://wordpress.org/plugins/custom-content-shortcode/

    July 10, 2014 at 9:15 pm #113855
    RoxG
    Member

    Thank you 🙂

    The only place I want the title removed is on Pages. Like my about page, services etc. I do want titles to appear on posts but if you see on my site, on the blog page there is no titles on the abbreviated posts. If I turn the toggle off, the title appears. I guessing its reading them as page titles because its on the blog "page"?

    The plugin does include a meta box on the Theme settings page but the only option it give is " By default, remove titles in the page post type." and I can select or deselect

    July 10, 2014 at 9:16 pm #113856
    RoxG
    Member

    I'll give the custom content shortcode a try!

    July 11, 2014 at 6:07 am #113879
    DTHkelly
    Member

    If you don't have a lot of pages, it may be simpler to use php to specify which pages should have no title.
    And you can deactivate the plugin.
    http://www.rickrduncan.com/wordpress/remove-genesis-page-titles
    From the tutorial, change the page IDs to your page IDs, and add the modified code to your functions.php
    [I use https://wordpress.org/plugins/code-snippets/%5D

    //* Remove page title for multiple pages
    //* Change '3645' and '4953' to match your needs
    add_action( 'get_header', 'child_remove_page_titles' );
    function child_remove_page_titles() {
    $pages = array( 3645,4953 );
    if ( is_page( $pages ) ) {
    remove_action( 'genesis_post_title', 'genesis_do_post_title' );
    }
    }

    You can use Reveal IDs https://wordpress.org/plugins/reveal-ids-for-wp-admin-25/ to find the ID # for each page.

    Also:

    Hide Page Titles In Genesis

    Remove Page & Post Entry Titles Conditionally in Genesis

    July 11, 2014 at 7:18 am #113886
    Summer
    Member

    Hi @RoxG!

    I think the problem you're having on your website is actually too much code 🙂

    The plugin Genesis Title Toggle by design and by default will only remove titles from Pages, and nothing else.

    However, if you also added the snippet of code (from your second post in this thread) that Kelly suggested, it would also add Posts to the list of post types with titles removed.

    So if you remove all extra code relating to removing titles, and just use the plugin, that should result in the behavior you want. The Installation instructions even describe how to remove all titles from all pages as a default setting:

    Go to Genesis > Theme Settings > Title Toggle to remove titles on all pages by default.

    If removing any extra title code and having just the plugin doesn't work, then there must be another conflict somewhere.


    WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
    Slice of SciFi | Writers, After Dark

  • Author
    Posts
Viewing 12 posts - 1 through 12 (of 12 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble