-
AuthorPosts
-
March 31, 2015 at 8:56 am #420995
Hi,
I’ve created a custom Enfold Tab Shortcode by following these instructions . I just copied the tabs.php file.
I’ve also altered the code as Dude describes here . This is the addition of this code (tweaked for a tab as the above link is for the accordion):
if(empty($tab_atts['title'])) { $tab_atts['title'] = avia_sc_toggle::$counter; } //following line added $tab_atts['title'] = do_shortcode($tab_atts['title']);
I can create a new Tab in the Page editor but when I enter a shortcode in the title and hit save and then go back into the Tab the tab title field is reset back to its default “Tab Title” and now at the start of the content field the following text appears:
‘ icon_select=’no’ icon=’ue800′ font=’entypo-fontello’]
Any ideas how I can stop this and get it to run the shortcode I insert in the tab title? The shortcode that I’m using returns straight text, and I’ve tried many different shortcodes but I get the exact same problem no matter what I use.
Thanks,
Benjamin
April 1, 2015 at 4:32 pm #421995Hey isa_sss!
Do you mind creating a temporary admin login and posting it here privately please?
Have you tried de-activating all active plugins and check if that helps?Cheers!
YigitApril 1, 2015 at 11:49 pm #422216This reply has been marked as private.April 4, 2015 at 4:02 am #423335Hi!
can you please add a link to the website in question?
Please try to deactivate all plugins to see if that helps. Afterwards you can activate them again one by one to see which one is causing this issue. Let us know if this helps.
Make sure to use newest WordPress and theme version.Best regards,
AndyApril 6, 2015 at 4:25 am #423752This reply has been marked as private.April 6, 2015 at 4:28 am #423755This reply has been marked as private.April 12, 2015 at 8:00 pm #427178Hi!
it’s currently not possible to use shortcodes inside of tab titles. Feel free to make a feature request for Kriesi here: kriesi.at/support/enfold-feature-requests/
Cheers!
AndyApril 12, 2015 at 11:21 pm #427222Thats a shame….thanks for checking. But according to this https://kriesi.at/support/topic/custom-shortcodes-in-accordion-title/ is it still possible to use them in Accordion’s?
Thanks,
Ben
April 14, 2015 at 10:03 am #428088Hi!
What kind of shortcode are you trying to add inside the tab title? If it’s an icon, you can add icons directly in the tab title without the modifications above. Just edit the title then enable the Tab Icon.
Cheers!
IsmaelApril 14, 2015 at 12:03 pm #428148Hi Ismael,
I need to add a shortcode that shows the current month name on the first tab, next month on the second tab, etc. I’m trying to do this using a shortcode [month_name] from the https://wordpress.org/plugins/extra-shortcodes/ plugin which will return “April”. The second tab would have [month_name plus=”1″] and so on…
The main content in each months tab is a booking form for each months available spots.
Thanks,
Benjamin
April 15, 2015 at 1:36 pm #428898Hi!
I’m sorry but I don’t think this is possible because right after you enter the tab title values and save, the strings are updated or replace via javascript. It breaks the shortcode right then and there. I’ll ask the rest of the support team if they have any workaround idea.
Best regards,
IsmaelMay 9, 2015 at 4:42 am #441852Hi Ismael,
Any workarounds yet? Is there a way to disable to javascript replacing it? Can I remove that part of the js code?
Thanks,
Benjamin
May 9, 2015 at 8:43 am #441918Hey!
Unfortunately, there is no workaround yet. Please hire a freelance developer if you really want to enable shortcodes on the tab title.
Best regards,
IsmaelMay 26, 2015 at 12:18 am #449758Thanks Ismael. Just as a pointer, is it the code in the tab.js that is messing with the shortcode? Thanks
May 26, 2015 at 11:45 am #450001Hi Ismael,
don’t worry about my last post, I figured out a work around. Thought I’d post it incase it helps others…I added just a sequential number as the Title of each tab. Then rather than the code in my first post on this thread I did this:
if(empty($tab_atts['title'])) { $tab_atts['title'] = avia_sc_toggle::$counter; } //following lines added $curtitle=$tab_atts['title']; $tab_atts['title'] = do_shortcode('[date format="F Y" timestamp="+'.$curtitle.' months"]');
Thanks,
bw
May 26, 2015 at 1:53 pm #450065 -
AuthorPosts
- You must be logged in to reply to this topic.