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 TicketTagged: Additional Tab, Place Time, shortcodes
-
AuthorPosts
-
November 14, 2017 at 8:15 am #405165
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.
November 14, 2017 at 9:04 am #405167Hello,
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
November 14, 2017 at 2:37 pm #405214Thank 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
PeterNovember 14, 2017 at 3:09 pm #405219OK, let us know how that works out for you
November 15, 2017 at 11:43 am #405348Hi 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?
November 15, 2017 at 3:48 pm #405385Hello!
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?
November 15, 2017 at 4:39 pm #405401Thank 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
PeterNovember 15, 2017 at 4:42 pm #405403Sorry 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
November 15, 2017 at 4:53 pm #405406Hi 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?
November 15, 2017 at 4:58 pm #405410Current 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.
ThanksNovember 15, 2017 at 5:06 pm #405413Thank you Paolo I see that now My misunderstanding I found this at https://wpgeodirectory.com/1-6-18-released/
Kind Regards
PeterNovember 16, 2017 at 8:13 am #405475Hello,
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
November 16, 2017 at 8:25 am #405478Hi 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
PeterNovember 16, 2017 at 8:45 am #405482Hello!
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.comNovember 16, 2017 at 8:53 am #405483Thank You Alex
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket