Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Transparent header on post type pages #1010491

    Thanks for your support but I have managed to do this way more easily. I will post the solution here, maybe it will help someone. I have used your great filter hook avf_header_setting_filter.

    First I run this filter through the page where the header is working like I want. Trough the php function print_r, I have print the whole array with the header settings. Than I compare this array with the array on custom post type and missing parts added to the filter. In my case the filter looks like this.

    add_filter('avf_header_setting_filter', 'avf_header_setting_filter_mod', 50, 1);
    function avf_header_setting_filter_mod($header_settings) {
    	if ( is_singular('diskuter') ) {
    		
    		$header_settings['header_transparency'] .= " header_transparency";
    		$header_settings['header_class'] .= " av_header_top av_logo_left av_main_nav_header av_menu_right av_custom av_header_sticky av_header_shrinking av_header_stretch_disabled av_mobile_menu_phone av_header_transparency av_header_searchicon av_header_unstick_top_disabled av_minimal_header av_bottom_nav_disabled  av_alternate_logo_active av_header_border_disabled";
    	}
    	return $header_settings;
    }
    in reply to: Transparent header on post type pages #1010314

    I don’t want the client to check the transparency setting each time when he is creating a new single post.

    Isn’t possible to set it up via these filters?

    avf_header_setting_filter
    avf_header_classes

    I already make the header sticky thanks to avf_header_setting_filter. But I dont know which classes to add and remove to make it transparent and change the logo version on scroll as I have it on another pages.

    Thank you.

    in reply to: Transparent header on post type pages #1010264

    Thank you for your reply but there is a problem. It is a custom post type and I cant see this option in the sidebar of my backend layout.

    Also, I need to change the color of the logo. I guess I will need to put the classes in the header with javascript.

    I thought, there is a better way to do this via php. And I still do. If it is working on page.php I don’t see a reason why it shouldn’t work on single post.

    • This reply was modified 6 years, 3 months ago by Anilix.
    in reply to: Transparent header on post type pages #1010161

    You can check it right now.

    in reply to: Transparent header on post type pages #1009703

    This link is what I set up in theme options and it is how it should be on all pages of the website.

    This link is on a single page where I want the same header effect.
    I have used this filter:

    add_filter('avf_header_setting_filter', 'avf_header_setting_filter_mod', 50, 1);
    function avf_header_setting_filter_mod($header_settings) {
    	if ( is_singular('diskuter') ) {
    		$header_settings['header_sticky'] = 'header_sticky';
    		$header_settings['header_transparency'] .= " header_transparency";	
    	}
    	return $header_settings;
    }

    I can see it added some classes into html tag. But I need to make the header transparent. The above filter make it only sticky and the menu text is now not visible.

    When I inspect the html and comparing the site with good header and site with bad header, i can see that I’m missing some classes in the header, especialy on scroll. Is there some way to make the header the same on all pages?

    Thank you.

    • This reply was modified 6 years, 3 months ago by Anilix.
Viewing 5 posts - 1 through 5 (of 5 total)