Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1047690

    Hello,

    I have an issue with the tabs set with “Initial Open” option to “0” (all tabs should be closed) – the first tab is being displayed if the option is “0”. If it’s changed to 1,2,3, etc. it behaves normally.

    How can this be fixed quickly? I tried to install the clean theme (no changes in the files) with the same results.

    Thank you!

    P.S: I’m using WP 5.0.1 and Enfold 4.5.1

    • This topic was modified 5 years, 11 months ago by ideance.
    #1049146

    Hey ideance,
    Sorry for the late reply, I have been looking into this and found that the action you are referring to, placing a zero in the “Initial Open” option to have no tabs open was a bug that was corrected on or about 2018-09-10:

    Tabs are not supposed to show/hide content but only to switch between content of the tabs

    Sorry, but please consider using a accordion element if you want to toggle content.

    Best regards,
    Mike

    #1053866

    Hi Mike, unfortunately I liked that “bug”. I am now using a later version of Enfold. Is there any way to keep all tabs closed when loading until one tab is chosen/clicked? Is it possible to keep all tabs closed via CSS or by adding some script in the page?

    #1053874

    I subscribe to that, it made sense to have ‘0’ for no tab content displayed and worked nicely. If someone doesn’t want to use the feature simply won’t have ‘0’ added.

    #1053875

    By the way, since we’re on tabs, there’s another functionality linked to the tabs that was lost. You could have named each tab and use them in achor links. That functionality was lost too.

    This code doesn’t work anymore to allow naming each of the tabs:
    /*adds support for the new avia sidebar manager*/
    add_theme_support(‘avia_sidebar_manager’);

    A lot of issues with the Enfold theme on the new WP5.0 it seems from the other posts on the forum too.

    #1053960

    Hi,
    The function to add custom tab and toggle ids is:

    add_theme_support('avia_template_builder_custom_tab_toogle_id');

    you can link to tabs with their hash such as:

    Please read more about tabs here

    Best regards,
    Mike

    #1054085

    didn’t help me so far, unfortunately, nor the links with descriptions of tabs :(

    as I said I am looking for a piece of code to keep all tabs closed when the page is loaded?

    Thanks again

    #1054103

    Hi,
    @FaM Sorry, I know you said you liked the “bug” but please consider using a accordion element if you want to toggle content.
    I do not recommend rolling back the bug fix, but this was the code that was added to fix the bug.
    The file is at: /enfold/config-templatebuilder/avia-shortcodes/tabs/tabs.php
    lines 298 – 306:

    	$tab_sc = ShortcodeHelper::shortcode2array( $content, 1 );
    			if( ! is_numeric( $initial ) || ( $initial < 1 ) )
    			{
    				$initial = 1;
    			}
    			if( $initial > count( $tab_sc ) )
    			{
    				$initial = count( $tab_sc );
    			}
    

    be sure to save a copy of the file, should your modifications brake it.

    Best regards,
    Mike

    #1054114

    Thank you very much for your support … I set row #301 “$initial = 0;” (instead of 1)

    Now it works perfectly, thank you so much for your efforts and your support ;-)

    #1054136

    Hi,
    Thanks for sharing your solution, and thanks for using Enfold.

    Best regards,
    Mike

    #1054221

    All is working as before, thanks for all the tips, that’s what I needed!

    #1054401

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)

    Best regards,
    Mike

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Tabs initial open option’ is closed to new replies.