Titles show for posts using post formats when adding HTML5 to Mindstream

Community Forums Forums Design Tips and Tricks Titles show for posts using post formats when adding HTML5 to Mindstream

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Robin 1 year, 5 months ago.

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


    Hi all,

    I am customizing the Mindstream theme, and after I’ve updated the CSS and added support for HTML5, titles start showing for posts using post formats. For instance, before the upgrade, the alt tag for the image displayed for posts that were status, video, link, chat, and anything else that isn’t standard. Now, the title of the post shows on all posts. Is there a way to get the theme to use the proper HTML5 markup, while still keeping the functionality that causes the images and their alt tags to show up on non-standard posts? I’ve tried adding a priority to the function calls that enable the support for post formats, post format images, and to the statement removing the title from non-standard posts, and I’ve set the priority as low as 3, but no luck. Any help would be appreciated. I’d just switch themes, but I use post formats a lot, and I don’t think there’s another Genesis theme that utilizes them while having the HTML5 support, so this would be a problem no matter what theme I use. Thanks.




    HTML5 uses different hooks than XHTML, so you need to find this section in your functions.php:

    function mindstream_remove_elements() {
    	// Remove if post has format
    	if ( get_post_format() ) {
    		remove_action( 'genesis_post_title', 'genesis_do_post_title' );
    		remove_action( 'genesis_before_post_content', 'genesis_post_info' );
    		remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
    	// Add back, as post has no format
    	else {
    		add_action( 'genesis_post_title', 'genesis_do_post_title' );
    		add_action( 'genesis_before_post_content', 'genesis_post_info' );
    		add_action( 'genesis_after_post_content', 'genesis_post_meta' );

    Here’s the code for the new hooks in the entry header, and here’s for the entry footer. HTH

    I do the best I can with what I’ve got. (say hey on twitter)

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

You must be logged in to reply to this topic.