new tab content

This topic contains 1 reply, has 2 voices, and was last updated by  Guust 7 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #381633

    James Bularz
    Expired Member
    Post count: 5

    I’ve created a new tab to show food menus in the individual detail listings on my site, and in the text listed below that I found on the blog post you write the following…

    To show your custom content inside the tab, please add the following code inside your active theme’s functions.php file.

    1
    2
    3
    4
    5
    6
    add_action(‘geodir_after_tab_content’ ,’geodir_my_new_tab_content’);
    function geodir_my_new_tab_content($tab_index)
    {
    if($tab_index ==’my_new_tab’)
    {echo “Hello world!!”;}
    }
    In this case we are simply showing the “Hello World!!” text. Instead of that you can add any code you want, like a shortcode, custom fields or any function to output other plugins’ content.

    Can you elaborate on how to output a plugin’s content to the tab? I use SiteOrigin pagebuilder and would like to use the rich text editor widget within the tab, so I can either use a text or PDF menu

    #381634

    Guust
    Moderator
    Post count: 29970

    What you are trying to achieve can be done in a simpler way. Just add a fieldset and an HTML field at GD > Place Settings > Custom fields.
    See more at https://wpgeodirectory.com/docs/core-place-settings/

    Thanks

Viewing 2 posts - 1 through 2 (of 2 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount