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

    #421995

    Hey 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!
    Yigit

    #422216
    This reply has been marked as private.
    #423335

    Hi!

    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,
    Andy

    #423752
    This reply has been marked as private.
    #423755
    This reply has been marked as private.
    #427178

    Hi!

    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!
    Andy

    #427222

    Thats 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

    #428088

    Hi!

    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!
    Ismael

    #428148

    Hi 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

    #428898

    Hi!

    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,
    Ismael

    #441852

    Hi 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

    #441918

    Hey!

    Unfortunately, there is no workaround yet. Please hire a freelance developer if you really want to enable shortcodes on the tab title.

    Best regards,
    Ismael

    #449758

    Thanks Ismael. Just as a pointer, is it the code in the tab.js that is messing with the shortcode? Thanks

    #450001

    Hi 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

    #450065

    Hey!

    Thank you for sharing your solution! :)

    Regards,
    Yigit

Viewing 16 posts - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.