Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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
    Fristil

    #594189

    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

    #594950

    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

    #597165

    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

    #653845

    Hey Isamael!
    It did not work using your code, i remove the if page statement aswell. Check link.

    #655104

    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

    #655157

    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.

    #656208

    Hi,

    It works on our installation. It’s probably not working because the site is using a very old version of the theme, 3.3.2. Please update the theme to the latest version, 3.6.1, and WordPress to 4.5.3.

    Best regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.