Tagged: enfold, header, transparent
-
AuthorPosts
-
August 27, 2014 at 3:20 pm #309868
Hey guys,
I want the glassy transparent header to stay glassy and transparent. Is there any possibility to acomplish that?
regards martin
August 28, 2014 at 7:45 am #310276Hey!
Do you want the header to stay glassy even when scrolled?
Regards,
JosueAugust 28, 2014 at 6:12 pm #310575Yes.
Regards Martin
August 28, 2014 at 7:05 pm #310605Hi,
Open js/avia.js and look for lines:
if(transparent) { if(st > 50) { header.removeClass('av_header_transparency'); } else { header.addClass('av_header_transparency'); } }
Replace them by this:
if(transparent) { header.addClass('av_header_transparency'); }
Regards,
Josue- This reply was modified 10 years, 3 months ago by Josue.
September 9, 2014 at 3:31 pm #315917awesome! thanks!
September 9, 2014 at 6:21 pm #316031You are welcome, glad to help :)
Regards,
JosueSeptember 14, 2014 at 12:16 pm #318841Hi Josue, I wrote a few minutes ago the same question and found now this post. Thanks. Is there a way to put this code snipped into my enfold child theme for future updates?
- This reply was modified 10 years, 3 months ago by adrianwackernah.
September 15, 2014 at 12:12 am #318937Hey!
You’d need to embed a modified js/avia.js from your child theme installation, try putting this code in your child theme functions.php:
function change_aviajs() { wp_dequeue_script( 'avia-default' ); wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true ); } add_action( 'wp_enqueue_scripts', 'change_aviajs', 100 );
Cheers!
JosueSeptember 21, 2015 at 12:22 pm #506366Hi perfect it workt flawless..
To use the child theme, do i need to copy the js/avia.js to my child theme folder? Or is the functions.php snippit enough?
- This reply was modified 9 years, 3 months ago by c3computers.
September 21, 2015 at 12:42 pm #506376Ive added the code above to my child Funtions.php. Now the menu works again in the child theme only other fuctions like the ICON pupups doesnt work anymore.
September 21, 2015 at 7:17 pm #506627Hey!
The icons do popup on my end (Chrome – OS X), try reloading the page some times.
Cheers!
JosueSeptember 22, 2015 at 9:19 am #506834i disabled the child theme again so that’s why it workt.
With the child theme enabled and the folowing snippet in functions.php
function change_aviajs() { wp_dequeue_script( 'avia-default' ); wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true ); } add_action( 'wp_enqueue_scripts', 'change_aviajs', 100 );
The popups wont show. (without the code in functions.php from the child theme it works)
But i think that then the js/avia.js will be overwriten?
September 22, 2015 at 10:22 am #506869Hi!
You need to create an avia.js (a duplicate) file at the indicated path:
http://c3computers.c3dev.nl/wp-content/themes/enfold-child/js/avia.jsBest regards,
JosueNovember 15, 2015 at 2:50 pm #536108For anyone who uses newer theme versions and still wants the header to shrink when you scroll:
Change
if(transparent) { if(st > 50) { //header.removeClass('av_header_transparency'); av_change_class(header, 'remove', 'av_header_transparency'); } else { //header.addClass('av_header_transparency'); av_change_class(header, 'add', 'av_header_transparency'); } } }
To:
if(transparent) { if(st > 50) { //header.removeClass('av_header_transparency'); //av_change_class(header, 'remove', 'av_header_transparency'); } else { //header.addClass('av_header_transparency'); av_change_class(header, 'add', 'av_header_transparency'); } }
So you only have to comment out the 1 line to make header always transparant AND remain shrinking header.
- This reply was modified 9 years, 1 month ago by lucasvrooij.
November 15, 2015 at 11:23 pm #536236Thanks for sharing it @lucasvrooij.
Regards,
JosueJanuary 28, 2016 at 10:55 am #573600Hi It work perfect like this
At to childtheme function.php
function change_aviajs() { wp_dequeue_script( 'avia-default' ); wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true ); } add_action( 'wp_enqueue_scripts', 'change_aviajs', 100 );
Copy
/httpdocs/wp-content/themes/enfold/js/avia.js
To
httpdocs/wp-content/themes/enfold-child/js/avia.js
Create folder ‘js’ if its not existing.
Open ‘avia.js and replace
if(transparent) { if(st > 50) { //header.removeClass('av_header_transparency'); av_change_class(header, 'remove', 'av_header_transparency'); } else { //header.addClass('av_header_transparency'); av_change_class(header, 'add', 'av_header_transparency'); } } }
With:
if(transparent) { if(st > 50) { //header.removeClass('av_header_transparency'); //av_change_class(header, 'remove', 'av_header_transparency'); } else { //header.addClass('av_header_transparency'); av_change_class(header, 'add', 'av_header_transparency'); } }
Good luck!
Topic can be closed
-
AuthorPosts
- The topic ‘Glassy transparent header’ is closed to new replies.