Tagged: category, full frame, header image
- This topic has 5 replies, 2 voices, and was last updated 7 years, 10 months ago by Mahesh.
-
AuthorPosts
-
January 25, 2016 at 4:41 pm #83700eggbananaParticipant
Hello,
I’d like to be able to add a specific header image to a category page. I’ve tried using a plugin (Category Featured Images), and this allows me to choose a header image. But when I navigate to a category page, my featured image isn’t recognized. Instead, it displays the same header image as my home page.
The posts pages have their own featured header; no problems there. I’ve tried the various options available in the customiser (enable header on entire site, posts/pages etc.)
Thanks!
January 25, 2016 at 5:23 pm #83708MaheshKeymasterHi @eggbanana,
This option is not available in our theme. Seems you’ve used Category Featured Image plugin, please contact Category Featured Image plugin’s support. This is out of theme support scope.
Regards,
MaheshJanuary 25, 2016 at 6:35 pm #83710eggbananaParticipantThanks Mahesh,
Is there a way to have an option, in the customiser, to ‘enable featured header’ on ‘Homepage,Page/Post Featured Image’?
Cheers
January 26, 2016 at 10:09 am #83751MaheshKeymasterHi @eggbanana,
Please create a child theme. Check this LINK to find more details on creating child theme. Activate child theme. Then in child theme’s
functions.php
add the following codes./** * Modify Parent function to display header in Homepage and Post/Page. * */ function fullframe_featured_overall_image() { global $post, $wp_query; $options = fullframe_get_theme_options(); $defaults = fullframe_get_default_theme_options(); $enableheaderimage = $options['enable_featured_header_image']; // Get Page ID outside Loop $page_id = $wp_query->get_queried_object_id(); $page_for_posts = get_option('page_for_posts'); if ( is_home() || is_singular() ) { // Check Enable/Disable header image in Page/Post Meta box if ( is_page() || is_single() ) { //Individual Page/Post Image Setting $individual_featured_image = get_post_meta( $post->ID, 'fullframe-header-image', true ); if ( $individual_featured_image == 'disable' || ( $individual_featured_image == 'default' && $enableheaderimage == 'disable' ) ) { echo '<!-- Page/Post Disable Header Image -->'; return; } elseif ( $individual_featured_image == 'enable' && $enableheaderimage == 'disabled' ) { fullframe_featured_page_post_image(); } } // Check Homepage if ( $enableheaderimage == 'homepage' ) { if ( is_front_page() || ( is_home() && $page_for_posts != $page_id ) ) { fullframe_featured_image(); } } // Check Excluding Homepage if ( $enableheaderimage == 'exclude-home' ) { if ( is_front_page() || ( is_home() && $page_for_posts != $page_id ) ) { return false; } else { fullframe_featured_image(); } } elseif ( $enableheaderimage == 'exclude-home-page-post' ) { if ( is_front_page() || ( is_home() && $page_for_posts != $page_id ) ) { return false; } elseif ( is_page() || is_single() ) { fullframe_featured_page_post_image(); } else { fullframe_featured_image(); } } // Check Entire Site elseif ( $enableheaderimage == 'entire-site' ) { fullframe_featured_image(); } // Check Entire Site (Post/Page) elseif ( $enableheaderimage == 'entire-site-page-post' ) { if ( is_page() || is_single() ) { fullframe_featured_page_post_image(); } else { fullframe_featured_image(); } } // Check Page/Post elseif ( $enableheaderimage == 'pages-posts' ) { if ( is_page() || is_single() ) { fullframe_featured_page_post_image(); } } else { echo '<!-- Disable Header Image -->'; } } else{ return; } }
Then go to “Dashboard=> Appearance=> Customize=> Header Image” and select “Entire Site, Page/Post Featured Image” in Enable Featured Header Image on dropdown.
Regards,
MaheshJanuary 27, 2016 at 7:59 am #83839eggbananaParticipantThank you so much! That worked great.
January 27, 2016 at 12:06 pm #83865MaheshKeymaster -
AuthorPosts
- The topic ‘Header image on category page.’ is closed to new replies.