Tagged: header, transparent
Hi, im trying to output a header. With the same settings and style with get_header();. But it only return a header that’s sticky and do not have the same behaviour as the other sites that havent been created programmatically.
How should i do?
With best regards
Fristil
Hey fristil!
Thank you for using Enfold.
Is this is a custom template? Try the same filter here: https://kriesi.at/support/topic/sticky-shrinking-header-on-one-page/#post-592570
Regards,
Ismael
Hi!
The following code you provided did not work in my case. Im using ACF to create a custom post type, then just creating the page using single-‘posttype’.php
With best regards
Pontus Espe
Hi!
Replace the is_page conditional function with the is_singular function plus the name of the custom post type as value:
add_filter('avf_header_setting_filter', 'avf_header_setting_filter_mod', 50, 1);
function avf_header_setting_filter_mod($header_settings) {
if ( is_singular('CPT NAME HERE') ) {
$header_settings['header_sticky'] = 'header_sticky';
$header_settings['header_shrinking'] .= " header_shrinking";
}
return $header_settings;
}
Best regards,
Ismael
Hey Isamael!
It did not work using your code, i remove the if page statement aswell. Check link.
Hi,
Welcome back. Did you set the correct custom post type name in the conditional function? The link that you provided do not exist. Please check.
Best regards,
Ismael
Hey Ismael!
As i said in my recent reply. I have removed the if statement. So the header settings should be set to all pages.