-
AuthorPosts
-
February 9, 2016 at 12:16 am #579980
Hello – I want ALL pages except the Homepage to have the Transparent Glassy header. I know this can be set on each individual page and post. However, I can’t set it on individual “single” post pages, and other dynamic pages, such as the “search” page, etc….
What can I do to make the default the transparent glassy header for ALL pages except the home page?
February 9, 2016 at 8:30 am #580201Hey nickydef,
Could you provide us with a link to the site in question so that we can take a closer look please?
Best regards,
RikardFebruary 9, 2016 at 8:40 am #580208i have this set for my search site and asked the question too for transparency headers here:
https://kriesi.at/support/topic/header-on-search-sites/
so for search site ad this to your child theme functions.php:
add_filter('avf_header_setting_filter', function($header) { if ( is_search() ) { $header['header_transparency'] = 'header_transparency header_glassy'; $header['header_class'] .= " av_header_transparency av_header_glassy"; } return $header; }, 10, 1);
it is not difficult to include is_category or is_single etc
here is discussed it for single event page:
https://kriesi.at/support/topic/styling-single-events-page/
but this is only the half thing – because on searchresults-page (or other dynamic pages) there is no chance to edit the layout for a header:
so you have to get content into it via:
add_action('ava_after_main_title', function() { if ( is_search() ) { ?> here comes the content <?php } });
the here comes the content you must change it to your desired content
i have styled one page and looked to the source code of it and via copy paste i got this insertion.- This reply was modified 8 years, 9 months ago by Guenni007.
February 9, 2016 at 10:09 am #580238i use firefox with firebug plugin (today a lot of browsers including firefox have their own tools for that)
clicking on the contextmenu of your mouse (mostly it is a right button of the mouse) and than goto firebug.
A new tab or i like the new window is opend with all info of your source code.
Hovering on the right side f.e. a div it will be highlighted on the left. So the source code i wanted was the section on top because this it is i want on my searchresults page too!
When the section i want is highlighted you only have to copy on the right side the whole code (in this case it is the whole div with av_section_1 id.this is the code to go to “here comes the content”
see here a page: http://webers-testseite.de/enf02/header-layout-for-search/
and here are the search results-page: http://webers-testseite.de/enf02/?s=oh+it+works- This reply was modified 8 years, 9 months ago by Guenni007.
February 9, 2016 at 2:28 pm #580405Got it figured out – however…
1) is there a way to set it so that each new page is created, Transparent Glassy is already set to be default?
2) is there a way to set it so that a single, specific image is used as the “default” background image for each new page and post when created? So that it’s not whitespace? It can be an image in our media library?Can’t give you the specific site address, as it’s not published yet – this is for our local machine build of the site.
February 11, 2016 at 6:21 am #581446Hi!
1.) Add this in the functions.php file to set the transparent glassy header as default for new pages or posts:
add_action( 'after_setup_theme', 'enfold_customization_product_switch' ); function enfold_customization_product_switch(){ add_filter('avf_builder_elements', 'avf_builder_elements_mod'); } function avf_builder_elements_mod($elements) { $counter = 0; foreach($elements as $element) { if($element['id'] == 'header_transparency') { $elements[$counter]['std'] = 'header_transparent header_glassy '; } $counter++; } return $elements; }
2.) I’m sorry but that will require a custom modification to the theme. Please contact codeable: http://kriesi.at/contact/customization
Cheers!
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.