Place featured image above header

Community Forums Forums General Discussion Place featured image above header

This topic is: not resolved

This topic contains 4 replies, has 2 voices, and was last updated by  brainfruit 11 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #86438

    brainfruit
    Member
    Post count: 3

    Hi

    I want to place a featured image above the post title on the blog page of my site, but have it below the title on single post pages.

    Google hasn’t been my friend on this occasion. Can anyone help?

    http://www.brainfruitcreative.com/
    #86446

    nutsandbolts
    Keymaster
    Post count: 3202

    You’d need to write a function… Something with a conditional like

    if( is_home() || is_archive() || is_category() )

    Let me ponder this for a little bit…


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #86447

    brainfruit
    Member
    Post count: 3

    Thanks! That’s very kind.

    #86449

    nutsandbolts
    Keymaster
    Post count: 3202

    Here’s a tutorial from Brad Dalton that should help: http://wpsites.net/web-design/add-remove-image-above-post-title/

    The only thing I would change is where it says if ( is_page() ) return; since you don’t want them on single posts either. So you’d do something like if ( is_page() || is_single() ) return; and that will keep the function from working on pages or single posts.


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #86452

    brainfruit
    Member
    Post count: 3

    Thank you! I’ll give this a go as soon as I get home. Thanks for taking the time to find the example.

    Dan.

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

You must be logged in to reply to this topic.