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

    Hey jeaustin,

    You need to copy those files to the child theme and make the changes there.

    Best regards,
    Victoria

    #1090584

    Do 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.
    #1090651

    Hi jeaustin,

    Please try adding this code too
    https://kriesi.at/support/topic/edit-shortcodes-js-in-child-theme/#post-399336

    Best regards,
    Victoria

    #1090653

    Victoria,

    I already did that as detailed in my previous post.

    It just does not work

    #1091434

    Hi,

    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ünter

    #1091457

    Thank 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
    James

    #1091461

    Hi,

    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ünter

    #1092681

    Hi,

    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.js

    with 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ünter

    #1092682

    You sir are the best…
    Something that will assit me no end!!!
    This is why I use the Enfold Theme :)

    #1092695

    Hi,

    Glad we could help you. It should become part of the core.

    Enjoy the theme and feel free to come back when you need further assistance.
    Have a nice day.

    Best regards,
    Günter

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Color Section – Section Minimum Height – ADD option for 15%’ is closed to new replies.