Metro Pro: 2 questions – Display featured image in posts, edit archive

Community Forums Forums Design Tips and Tricks Metro Pro: 2 questions – Display featured image in posts, edit archive

This topic is: not resolved

This topic contains 2 replies, has 3 voices, and was last updated by  Dan B 11 months, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #62308

    dpeschio
    Participant
    Post count: 3

    Hi and thanks in advance for any help. I am building a site using Metro Pro and would like to display the featured image under the page title on single posts – except for the category ‘maps’. How can I accomplish this?

    I also would like to remove the author meta data, filed under and tags from category archives. Can anyone help me with this as well?

    The dev site is here: http://dev.carolinaaletrails.com

    Thanks!

    • This topic was modified 11 months, 2 weeks ago by  dpeschio. Reason: misspelling
    • This topic was modified 11 months, 2 weeks ago by  dpeschio. Reason: misspelling
    http://dev.carolinaaletrails.com
    #62456

    coreyallen
    Participant
    Post count: 1

    I’d like to know this as well.

    #62460

    Dan B
    Participant
    Post count: 26

    Hi dpeschio,

    Just want to say that I love your website. I’m a Raleigh guy, but I’m now thinking about moving closer to an Ale Trail. :-)

    Here’s how I display featured images in my Metro Pro theme mod. The following code would go in your Functions.php folder, and you could customize certain aspects, to suit your site.

    This code will show featured images in Category 1 and Category 2, but none others (i.e. such as Maps):

    
    // Add Post image above post title, single posts only (Gen v2) //
    add_action( 'genesis_entry_header', 'show_post_image' );
    function show_post_image() {
    	if ( in_category( 'category1')) {
    		echo get_the_post_thumbnail($thumbnail->ID);
    	}
    	elseif ( in_category( 'category2')) {
    		echo get_the_post_thumbnail($thumbnail->ID);
    	}
    	else {
    	}
    }
    

    As far as I’m aware, there is not a way turn on featured images for all posts, except one category. Basically, you must enable the posts only for the categories you wish to see features images in.

    Good luck!


    Dan @ ZindaMedia
    Freelance web development and design for non-profits and small businesses.

    • This reply was modified 11 months, 2 weeks ago by  Dan B.
    • This reply was modified 11 months, 2 weeks ago by  Dan B.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.