Enable Shortcodes in text area/ html field

This topic contains 2 replies, has 2 voices, and was last updated by  GBOB Website 7 years, 6 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #293284

    GBOB Website
    Expired Member
    Post count: 13

    Hi,

    Thanks for the quick response re earlier query, just wanted to ask this, I would like to add a list of employees in the company/place profiles in a new tab, but the list can only be added by shortcode, question is exactly as is answered in this post:
    https://wpgeodirectory.com/support/topic/shortcodes-in-custom-fields/#post-25589

    But the thing is Im not sure where to paste this code, is it just in fuctions.php?
    Will I paste it exactly like this?:

    <?php echo do_shortcode( companydirectory ) ?>
    add_filter(‘geodir_detail_page_tab_list_extend’, ‘geodir_detail_page_tab_list_extend’) ;

    function geodir_detail_page_tab_list_extend($tab_array)
    {
    $tab_array[‘company_directory’] = array(
    ‘heading_text’ => __(‘New Tab’,GEODIRECTORY_TEXTDOMAIN),
    ‘is_active_tab’ => false,
    ‘is_display’ => apply_filters(‘geodir_detail_page_tab_is_display’, true, ‘company_directory’),
    ‘tab_content’ => ”
    );
    return $tab_array ;
    }
    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 do_shortcode( companydirectory );
    }
    }

    Thanks so much,

    #293359

    Kor
    Moderator
    Post count: 16516

    Hi there,

    Kindly refer to this theead instead. https://wpgeodirectory.com/support/topic/shortcodes-in-listing-tabs/#post-290527

    Thanks!

    #294874

    GBOB Website
    Expired Member
    Post count: 13

    Hello,

    Thank you so much it works now 🙂

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

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

Open Support Ticket