April 17, 2016 at 3:31 pm #183792
I really like the Interior Pro theme, but would like to replace the hero images with featured images, so each page would have a unique header.
Is this easily doable?
I've achieved that look using Blox Lite and Outreach theme and happy with that, but if I can upgrade to an HTML 5 theme that already does that, would be sweet.
http://wmbc.caApril 18, 2016 at 6:29 am #183823
Each page or each post?
Featured images can be added to both pages and posts but how about archives?
What do you want to display on category, tag, author, date, blog and other archive pages as these don't include a meta box for adding a featured image.
Hero? What do you mean by this? Do you mean the header image?
Its doable using many different coding methods as well as plugins like WP Display Header
April 18, 2016 at 8:02 am #183828
Ok got it now.
One method would be to modify the value for the $image_post in lib output.php
April 18, 2016 at 11:27 pm #183885
Thanks for your quick reply!
As you figured out from my obscure question, I am looking to display a unique header image for each page, post, and select archive pages. Blox Lite is great for posts and pages, but hasn't worked for archives. I tried to bypass the restriction of no meta box for featured image for archives by adding a plugin - Category Featured Images, but wherever that plugin is placing the info for the featured image, is not being picked up by Blox Lite.
I'll try your suggestion, and look for a plugin that both displays the featured image as a header and adds the ability to assign featured images to archives. Thanks again!April 29, 2016 at 6:58 pm #184713webcamiParticipant
Did you find a plugin for this? Would love to know!
CamiApril 29, 2016 at 7:21 pm #184715April 29, 2016 at 8:01 pm #184718
Actually moved to a different theme, and discovered Blox Lite actually can do the job, just had to change how I approached the problem. Instead of configuring one Blox to display featured image for each archive (which failed, as there IS no featured image for an archive), had to a create a Blox / custom image for each archive. Same effect, just a couple more steps if I add an archive. Works well.July 14, 2016 at 4:07 pm #189505sonamMember
Hi - you can make the featured image the hero image on pages, or posts, in the output.php file.
Firstly, find the three parts like this in the output.php file, relating to front-page, page and post
$image_page = preg_replace( '/^https?:/', '', get_option( 'page-interior-image', sprintf( '%s/images/bg-post.jpg', get_stylesheet_directory_uri() ) ) );
And replace with:
$image_page = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
I also commented out the code relating to that section in the customize.php file to avoid confusion with uploading imags through customizer.
Hope this helps
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.