• 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

aaronc

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
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • March 4, 2014 at 7:55 pm in reply to: Add custom ID to div.site-inner with filter #93455
    aaronc
    Member

    I've also found the genesis_structural_wrap-{context} filter in layout.php on line 494.

    I tried filtering it using the following code in my child functions.php with no success:

    function ac_custom_site_inner_output( $output, $original_output ) {
    
    	switch ( $original_output ) {
    		case 'open':
    			$output = sprintf( '<div id="test" %s>', genesis_attr( 'structural-wrap' ) );
    			break;
    		case 'close':
    			$output = '</div>';
    			break;
    	}
    
    	return $output;
    }
    add_filter('genesis_structural_wrap-site-inner', 'ac_custom_site_inner_output');

    Again, any help is greatly appreciated.

    Thanks,
    Aaron

    ---

    P.S. I've included the genesis_structural_wrap() function below for convenience:

    /**
     * Potentially echo or return a structural wrap div.
     *
     * A check is made to see if the <code>$context</code> is in the <code>genesis-structural-wraps</code> theme support data. If so, then the
     * <code>$output</code> may be echoed or returned.
     *
     * @since 1.6.0
     *
     * @param string $context The location ID.
     * @param string $output  Optional. The markup to include. Can also be 'open'
     *                        (default) or 'closed' to use pre-determined markup for consistency.
     * @param boolean $echo   Optional. Whether to echo or return. Default is true (echo).
     *
     * @return string Wrap HTML.
     */
    function genesis_structural_wrap( $context = '', $output = 'open', $echo = true ) {
    
    	$wraps = get_theme_support( 'genesis-structural-wraps' );
    
    	//* If theme doesn't support structural wraps, bail.
    	if ( ! $wraps )
    		return;
    
    	//* Map of old $contexts to new $contexts
    	$map = array(
    		'nav'    => 'menu-primary',
    		'subnav' => 'menu-secondary',
    		'inner'  => 'site-inner',
    	);
    
    	//* Make the swap, if necessary
    	if ( $swap = array_search( $context, $map ) ) {
    		if ( in_array( $swap, $wraps[0] ) )
    			$wraps[0] = str_replace( $swap, $map[ $swap ], $wraps[0] );
    	}
    
    	if ( ! in_array( $context, (array) $wraps[0] ) )
    		return '';
    
    	//* Save original output param
    	$original_output = $output;
    
    	switch ( $output ) {
    		case 'open':
    			$output = sprintf( '<div %s>', genesis_attr( 'structural-wrap' ) );
    			break;
    		case 'close':
    			$output = '</div>';
    			break;
    	}
    
    	apply_filters( 'genesis_structural_wrap-' . $context, $output, $original_output );
    
    	if ( $echo )
    		echo $output;
    	else
    		return $output;
    
    }
    February 17, 2014 at 12:03 pm in reply to: How to Filter genesis_post_title_output #90816
    aaronc
    Member

    Matt,

    I haven't been able to find a solid answer to my question, but I thought I'd share this article I found that offers one solution: http://sridharkatakam.com/remove-hyperlinks-post-titles-gensis/

    The solution offered in the article simply includes the entire genesis_do_post_title() function, while removing and customizing the desired bits of code. This doesn't seem like the proper way to use the genesis_post_title_output filter, but it at least works.

    I'm still interested to hear from the StudioPress community on how to properly use the genesis_post_title_output filter entry titles.

    Thanks,
    Aaron

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)

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