Tagged: header, transparent
-
AuthorPosts
-
March 3, 2016 at 10:37 am #592537
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
FristilMarch 7, 2016 at 11:05 am #594189Hey 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,
IsmaelMarch 8, 2016 at 11:49 am #594950Hi!
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’.phpWith best regards
Pontus EspeMarch 12, 2016 at 8:28 am #597165Hi!
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,
IsmaelJune 27, 2016 at 4:13 pm #653845Hey Isamael!
It did not work using your code, i remove the if page statement aswell. Check link.June 30, 2016 at 6:31 am #655104Hi,
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,
IsmaelJune 30, 2016 at 9:59 am #655157Hey Ismael!
As i said in my recent reply. I have removed the if statement. So the header settings should be set to all pages.July 3, 2016 at 5:07 am #656208 -
AuthorPosts
- You must be logged in to reply to this topic.
