[Resolved] Custom post header with featured image

Home Forums Support [Resolved] Custom post header with featured image

Home Forums Support Custom post header with featured image

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1365771
    Marc

    I’m trying to create a custom post header similar to the wirecutter layout: https://www.nytimes.com/wirecutter/reviews/best-wired-wireless-gaming-mouse/

    All I’m really trying to do is get the title above the container which holds the sidebar and content area. So the featured image on top, title below, then the sidebar/content areas.

    I tried playing around with custom headers but I don’t want the featured image to be a background.

    What’s the best way to go about this?

    Thanks

    #1366154
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    What if you built a Header Element, but included the featured image in the content instead of using it as a background?

    You can output the featured image with this template tag: {{custom_field.thumbnail_id}}

    By default it will output the “medium” size image. You can change that like this:

    add_filter( 'generate_hero_thumbnail_id_size', function() {
        return 'large';
    } );

    Let me know ๐Ÿ™‚

    #1366697
    Marc

    Tom saves the day again! ha. I didn’t know there was a tag for the featured image. That should work. Thanks!

    #1367199
    Tom
    Lead Developer
    Lead Developer

    No problem! ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.