-
AuthorPosts
-
December 20, 2018 at 1:39 pm #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.
December 28, 2018 at 4:33 am #1049146Hey 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,
MikeJanuary 14, 2019 at 11:25 pm #1053866Hi 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?
January 14, 2019 at 11:44 pm #1053874I 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.
January 14, 2019 at 11:48 pm #1053875By 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.
January 15, 2019 at 6:11 am #1053960Hi,
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,
MikeJanuary 15, 2019 at 12:30 pm #1054085didn’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
January 15, 2019 at 1:12 pm #1054103Hi,
@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,
MikeJanuary 15, 2019 at 1:33 pm #1054114Thank 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 ;-)
January 15, 2019 at 2:54 pm #1054136January 15, 2019 at 6:05 pm #1054221All is working as before, thanks for all the tips, that’s what I needed!
January 15, 2019 at 11:31 pm #1054401Hi,
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 -
AuthorPosts
- The topic ‘Tabs initial open option’ is closed to new replies.