-
AuthorPosts
-
April 14, 2019 at 5:33 am #1090496
I am adding a 15% option to the “Section Minimum Height” in the color section
Is there a more elegant way to add this in the child enfold theme?
I have changed the following and its all working but on update it will need to be done again….
in: /enfold/js/shortcodes.js
Under $.fn.avia_browser_height = function()
I added to calc_height = function()
wh15 = Math.round( wh100 * 0.15 ),
and
css += “.av-minimum-height-15 .container, .av-cell-min-height-15 > .flex_cell {height:”+wh15+”px;}\n”
then in: enfold/config-templatebuilder/avia-shortcode/section.php
I added __(‘At least 15% of Browser Window height’,’avia_framework’ ) =>’15’,
Apart from needing to use small or no pading this works fine for what I need but is there a way so I dont need to change it when I upgrade Enfold?- This topic was modified 5 years, 7 months ago by jeaustin.
April 14, 2019 at 10:20 am #1090558Hey jeaustin,
You need to copy those files to the child theme and make the changes there.
Best regards,
VictoriaApril 14, 2019 at 11:42 am #1090584Do I need to copy the directory structure?
as in: /enfold/js/shortcodes.js
copies to: /enfold-child/js/shortcodes.js
Its that simple?I have copied these files including the full path and remove the code from the original template file but its not working
I have even done as suggested here: https://kriesi.at/documentation/enfold/add-custom-js-or-php-script/
to load the child theme shortcodes.js but it still will not work!- This reply was modified 5 years, 7 months ago by jeaustin.
April 14, 2019 at 4:16 pm #1090651Hi jeaustin,
Please try adding this code too
https://kriesi.at/support/topic/edit-shortcodes-js-in-child-theme/#post-399336Best regards,
VictoriaApril 14, 2019 at 4:18 pm #1090653Victoria,
I already did that as detailed in my previous post.
It just does not work
April 16, 2019 at 2:13 pm #1091434Hi,
To keep your modifications of the php file copy the file enfold/config-templatebuilder\avia-shortcodes\section.php to your child theme folder
enfold-child/shortcodes/
and rename the class (= creates your own class ) or remove the original file.
But I’m afraid there is no easy way to override the jQuery avia_browser_height function in js.
As it is only a few lines of code I think you better stick to modifying it after each update.
I add it to our dev – maybe I find a solution to allow to choose a custom value and not a fixed one.
Best regards,
GünterApril 16, 2019 at 3:10 pm #1091457Thank you Gunter,
I had already resigned myself to this fact after looking more closely at the code.
It would be great to have an editiable % to go along with the editable px size ;)
Regards
JamesApril 16, 2019 at 3:13 pm #1091461Hi,
I will try my best. I will let you know when we have a solution.
Thank you for using Enfold and enjoy the theme.
Best regards,
GünterApril 19, 2019 at 2:04 pm #1092681Hi,
I extended the options for section and grid row to allow custom % values.
Update
enfold\config-templatebuilder\avia-shortcodes\section.php
enfold\config-templatebuilder\avia-shortcodes\grid_row\grid_row.php
enfold\js\shortcodes.jswith the corresponding files in https://github.com/KriesiMedia/enfold-library/tree/master/temp_fixes/Enfold_4_5_6/section_height
Based on Enfold 4.5.6.
Best regards,
GünterApril 19, 2019 at 2:06 pm #1092682You sir are the best…
Something that will assit me no end!!!
This is why I use the Enfold Theme :)April 19, 2019 at 3:00 pm #1092695 -
AuthorPosts
- The topic ‘Color Section – Section Minimum Height – ADD option for 15%’ is closed to new replies.