Forum Replies Created
-
AuthorPosts
-
Dean GrayMember
Hopefully people will see this so I finally get the framework and I've removed the original function and added my own now what is probably the easy bit for people to help with. So I'm editing the function genesis_do_post_title.
As it says in the original post I want to add a conditional so if the category of the post is "work" in my case. I want to wrap the post_title in a anchor tag below if original function now it looks like the functionality is already but link part looks like its saying if the post isn't singular add a href. Any have any advise on how if should edit this i.e. just add a conditional at the end or amend the link if??
$title = apply_filters( 'genesis_post_title_text', get_the_title() ); if ( 0 === mb_strlen( $title ) ) return; //* Link it, if necessary if ( ! is_singular() && apply_filters( 'genesis_link_post_title', true ) ) $title = sprintf( '<a href="%s" rel="bookmark">%s</a>', get_permalink(), $title ); //* Wrap in H1 on singular pages $wrap = is_singular() ? 'h1' : 'h2'; //* Also, if HTML5 with semantic headings, wrap in H1 $wrap = genesis_html5() && genesis_get_seo_option( 'semantic_headings' ) ? 'h1' : $wrap; //* Build the output $output = genesis_markup( array( 'html5' => "<{$wrap} %s>", 'xhtml' => sprintf( '<%s class="entry-title">%s</%s>', $wrap, $title, $wrap ), 'context' => 'entry-title', 'echo' => false, ) ); $output .= genesis_html5() ? "{$title}</{$wrap}>" : ''; echo apply_filters( 'genesis_post_title_output', "$output \n" );
Dean GrayMemberThank you for the extra links the 2nd link is very useful and I think holds my answer.
Just got to read through his tutorial I know the the hook i need to amend is genesis_entry_header i just need to find the original hook so I can then amend it.
Dean GrayMemberHi,
Thank you for the links but I have installed the plugin and it doesn't appear in the admin panel which looks to be a known issue with no resolve as of yet. I know, the hook i need is genesis_entry_header but I can't find it in the file structure.
Are you able to help me find this last bit of information
-
AuthorPosts