Additional Tab & Shortcodes

This topic contains 19 replies, has 3 voices, and was last updated by  Peter Munton 6 years, 11 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #405165

    Peter Munton
    Free User
    Post count: 52

    Hi I would like to add a short code to my new tab but this would need to be different in each place ie “[mbhi_hours location=”your location name”] ” where “your location name” would be different for each place. would it be possible to add a new field in the “Place edit” that would place the result of the shortcode in the “Time position” in the right sidebar, or maybe the existing “time input ” could be adjusted to accept shortcodes.

    #405167

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    We have an example here of how you can do that type of thing, adding a shortcode to a tab, customized for each place:

    https://wpgeodirectory.com/formidable-forms-in-geodirectory-tabs/

    You can post your new code back here if you want us to take a look at it.

    If you are looking for GD Business Hours you can find it here:

    https://wpgeodirectory.com/downloads/gd-business-hours-2/

    Let us know how it goes

    #405214

    Peter Munton
    Free User
    Post count: 52

    Thank you Alex for your prompt reply. I am aware of the GD Business our add on but I need to work with a free add on.
    The link you gave is for inserting a form in a new tab and seems conditional on an email being submitted. My knowledge of writing code is very limited and I feel this is beyond me. But thank you for your help.
    I will keep looking for an answer.

    Kind Regards
    Peter

    #405219

    Alex Rollin
    Moderator
    Post count: 27815

    OK, let us know how that works out for you

    #405348

    Peter Munton
    Free User
    Post count: 52

    Hi Alex I inserted this code
    // Enable shortcodes in text widgets
    add_filter(‘widget_text’,’do_shortcode’);
    (found at “http://www.wpbeginner.com”

    In the “/wp-content/themes/supreme-directory/functions.php” File

    The Profile section of the Place now accepts short code. Is there somewhere else I should place this code for the “Text imput” in my custom field and / or the “Time input Field” so that these will accept a Short code?

    #405385

    Alex Rollin
    Moderator
    Post count: 27815

    Hello!

    Here’s a solution for adding a new tab with shortcodes: https://wpgeodirectory.com/support/topic/shortcodes-in-custom-fields/

    Are you going to manually add the shortcode to every listing, to every custom field?

    If you don’t want to do that, the tab above might work for you.

    As it says here, you will need to edit the template in order to enable shortcodes in a custom field: https://wpgeodirectory.com/support/topic/enable-shortcodes-in-custom-fields/

    https://wpgeodirectory.com/docs/customizing-geodirectory-templates/

    Is the content of the shortcode supposed to be different for each listing? Or the same? Are we still talking about business hours?

    #405401

    Peter Munton
    Free User
    Post count: 52

    Thank you for your prompt reply I will try your link for a solution.
    Just so you understand fully what I am trying to do I am using a plugin called “Business Hours Indicator” (I know there is a GD plugin to do this but it costs $27 and the one I am using is free). The plugin I am using produces a shortcode for each Hours of Business you need ie one per “GD place”. This is now working in the “profile” of the “GD Place” but it is not working in the “GD Time” in the right side panel, I have also created a custom field that shows in its own Tab, and has a section in the edit page where I placed the shortcode, this aso is not working, please see:-
    http://the-directory.finedon.org.uk/places/united-kingdom/northamptonshire/finedon/hair-beauty/kings-queens-hairdressing/
    I hope this is not to confusing.
    Thank you for your time and help
    Kind Regards
    Peter

    #405403

    Peter Munton
    Free User
    Post count: 52

    Sorry just to add I know I could just put this information in the profile area, but aesthetically I would prefer this to be either in a tab or in the right side bar.

    Peter

    #405406

    Peter Munton
    Free User
    Post count: 52

    Hi I’m not sure if this make a difference I have found a comment from Paolo that states version 1.6.18 is launched. My version of “Supreme Directory” is 1,1,6 but in the wordpress updates page it says my themes are up to date?

    #405410

    Paolo
    Site Admin
    Post count: 31206

    Current version of Supreme is 1.1.6: https://wordpress.org/themes/supreme-directory/
    I’m nbot sure where you found that info, I was probably referring to GeoDirectory (the plugin), not supreme.
    Thanks

    #405413

    Peter Munton
    Free User
    Post count: 52

    Thank you Paolo I see that now My misunderstanding I found this at https://wpgeodirectory.com/1-6-18-released/

    Kind Regards
    Peter

    #405475

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    You can do that with custom fields using “Show in what location”:

    https://wpgeodirectory.com/docs/core-place-settings/#custom

    Let us know how that works for you. If you would like us to take a look, make sure your plugins and WP install are up to date, and then create a private reply here with your site URL and Admin credentials.

    Thanks

    #405478

    Peter Munton
    Free User
    Post count: 52

    Hi Alex I have already done this, that is how you can see the “Hours Of Business” tab on the “Place” page the problem is that the input field only accepts Text not short codes, can I change this so that the input field accepts Shortcodes.

    Kind regards
    Peter

    #405482

    Alex Rollin
    Moderator
    Post count: 27815

    Hello!

    You can try to make the change yourself, or hire a developer to do it for you.

    Here’s a solution for adding a new tab with shortcodes: https://wpgeodirectory.com/support/topic/shortcodes-in-custom-fields/

    As it says here, you will need to edit the template in order to enable shortcodes in a custom field: https://wpgeodirectory.com/support/topic/enable-shortcodes-in-custom-fields/

    Related:
    https://wpgeodirectory.com/docs/customizing-geodirectory-templates/
    https://geodirectoryexperts.com

    #405483

    Peter Munton
    Free User
    Post count: 52

    Thank You Alex

Viewing 15 posts - 1 through 15 (of 20 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