Forum Replies Created
-
AuthorPosts
-
aaronc
MemberI'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; }
aaronc
MemberMatt,
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 -
AuthorPosts