Reply To: Custom header and caption not appearing on Posts Page

Home Forums WordPress Themes – Premium Circumference Custom header and caption not appearing on Posts Page Reply To: Custom header and caption not appearing on Posts Page

#39440
Sushil Adhikari
Moderator

Hi Robert Mion,

Thank you for contacting Styled Themes support team, we are really sorry for the inconvenience caused. This happens when ACF plugin is unable to queried the blog page.
Please have a look on this article for reference: https://support.advancedcustomfields.com/forums/topic/acf-fields-not-displaying-on-posts-page/

Here on theme you need to make some sligt changes on header.php template. Please customize header.php file keeping on child theme otherwise
your changes will lost on theme update.

Find this code on header.php file:

<aside id="cir-banner" style="background-color: <?php echo get_theme_mod( 'banner_bg_colour', '#c6b274' ); ?>; <?php if ( get_header_image() ) : ?>background-image: url(<?php header_image(); ?>);<?php endif; ?><?php if( get_post_meta($post->ID, 'header_background', true) ) { ?> background-image: url(<?php echo esc_url (the_field('header_background')); ?>); <?php } ?> color: <?php echo get_theme_mod( 'banner_text_colour', '#ffffff' ); ?>;">
			<?php get_sidebar( 'banner' ); ?>
</aside>

And replace above code with the following code:

<?php

$post_id = false;

if( is_home() ) {
	$post_id = 123; // specif ID of home page
}

<aside id="cir-banner" style="background-color: <?php echo get_theme_mod( 'banner_bg_colour', '#c6b274' ); ?>; <?php if ( get_header_image() ) : ?>background-image: url(<?php header_image(); ?>);<?php endif; ?><?php if( get_post_meta($post->ID, 'header_background', true) ) { ?> background-image: url(<?php echo esc_url (the_field('header_background', $post_id )); ?>); <?php } ?> color: <?php echo get_theme_mod( 'banner_text_colour', '#ffffff' ); ?>;">
			<?php get_sidebar( 'banner' ); ?>
</aside>

Note: If you’re not technically sound in WordPress, we suggest you to take help of a developer.

Thanks