Possible to customize crop of header image on individual post pages?

  • Author
    Posts
  • #81286

    Given how I understand the Featured Images to work, I’m not sure if this is possible, but:

    —can I choose a specific section of my designated Featured Image to show on the individual post page (instead of the default crop of the top slice of the image… even being able to choose ‘top’ ‘middle’ or ‘bottom’, something like that, would be super useful) , or,

    —can I designate a different image file other than the Featured Image to be the header on individual post pages?

    Thanks for you assistance!

    The blog I need help with is sevenmilesblog.com.

    #81513

    yuriyportnykh
    Theme Author

    Hi.

    I’m afraid it’s not possible to make modifications to the Featured Image on single post pages only. But there’s a way to designate a different image file using CSS for each post.

    1. Upload an image via Dashboard / Media and copy its URL. Let’s say the URL is: http://mydomain.com/wp-content/uploads/2015/single_post_image.jpg

    2. Add CSS code for the single post page to replace the featured image URL with the newly uploaded file URL.

    .single-post.postid-276 #big_thumbnail {
    background-image: url( http://mydomain.com/wp-content/uploads/2015/single_post_image.jpg );
    }

    Replace 276 with the post ID. Check out the following instructions on how to find a post ID

    #81535

    Okay, I’ve been able to do everything except I’m not sure how to add CSS to a single post page- I see many methods suggested, which do you think is best? Possibly this plug-in (link below)? I would appreciate your expert opinion on the best method, thank you!

    https://wordpress.org/plugins/wp-add-custom-css/installation/

    #81536

    yuriyportnykh
    Theme Author

    You can add it using the Custom CSS Editor. Please, see here for more information: https://en.support.wordpress.com/custom-design/custom-css/

    #81588

    Okay, I just wasn’t sure if it was advisable to add many individual page changes to the main CSS area, but yes, following your instructions and using the code provided works perfectly—I am able to upload the custom crops of the featured images for certain pages, thank you!

    #81589

    yuriyportnykh
    Theme Author

    Glad it worked for you.

The topic ‘Possible to customize crop of header image on individual post pages?’ is closed to new replies.