Events Shortcode

This topic contains 10 replies, has 3 voices, and was last updated by  Guust 6 years, 10 months ago.

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

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #414574

    Dane Elsdon
    Free User
    Post count: 27

    Dear Geodirectory,

    I hope everyone is doing well. I recently purchased the events plugin for my site.
    I have created custom tabs for details page when opening a venue.

    When I use the shortcode [gd_event_listing] on “Profile” of the venue then it displays the dummy event content.
    I created a tab which is called “Events” and created a category under event categories and using the id of the category to display the events in that category for example [gd_event_listing layout=3 category=68] but does not work, however it works in the “Profile” tab.

    I have attached an image. Please review and I hope to hear from you soon.
    Kind regards,
    Dane

    #414579

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    To customize your detail page in that way you would need to edit some PHP.

    Here’s a link where the general process is described in an example:
    https://wpgeodirectory.com/support/topic/shortcodes-in-custom-fields/

    You can do this yourself or hire a GD Expert to do it for you.

    Hope that helps 🙂

    Alex

    For more information about customizing your style as well as how to add custom PHP to your site, please see the related links below.

    Links
    https://wpgeodirectory.com/docs/customizing-your-style/
    https://wpgeodirectory.com/docs/common-styling-examples/
    Automatic Updates are Awesome! Get yours setup today!
    GD Experts help site owners reach their goals faster

    #414583

    Dane Elsdon
    Free User
    Post count: 27

    Hi Alex, thank you for your reply.

    I purchased the Custom Fields plugin before this too. In the backend I added the fields and extra fields to add with my listings. I followed the steps in the link you sent me but my site just hangs on a blank page after inserting the code.

    #414584

    Dane Elsdon
    Free User
    Post count: 27

    The code that is given Paolo in the link you gave me to the article.
    In the backend I added “Events” tab.
    And all I want to echo in the events tab is [gd_event_listing] shortcode.

    Would it possible to modify the function that Paolo gave in the article for me please. I have modified the function according to my knowledge but page just hangs.

    Hope to hear from you soon Alex.
    Thank you for your time.

    #414586

    Guust
    Moderator
    Post count: 29970

    I think you will find the info here: https://wpgeodirectory.com/docs/linking-events-to-places/
    If I understand correctly, all you are trying to do is add the events at a venue to a tab for that venue.

    But maybe I misunderstood …

    #414589

    Dane Elsdon
    Free User
    Post count: 27

    Hi Guust, thank you for your reply. Yes the link you sent me is not what I am looking for at the moment.

    I purchased the custom fields tab a while ago and added extra tabs to the single detail page.
    “Menu” and “Events”

    Menu is working fine because I am using a custom coded accordion. The “Events” tab I am adding a shortcode to display the events from a certain category that I created under Events Categories. I purchased the Events Addon yesterday. If I use the [gd_event_listing] or [gd_event_calendar] in the 1st tab which is “Profile” then it works 100%, it displays the calender and the dummy events I added. But when I use the shortcode in my “Events” tab, then it does not work, it only displays the shortcode that I added in the backend.
    I would love to display events from a certain category for certain listings example [gd_event_listing layout=3 category=68] in the “Events” tab.

    I am sure there is a simple solution for this.
    Hope to hear from you soon.
    Kind regards.
    Dane

    #414596

    Dane Elsdon
    Free User
    Post count: 27

    I will try the link you sent me, I just read through and will try it out

    #414598

    Dane Elsdon
    Free User
    Post count: 27

    I have followed “By default, users can only link events to their own listings in the selected CPT. If you want any other user to link an event to a listing of another user, go to GD > Event Settings > Any linking Author and tick Allow linking to any post not just users own posts?”

    When adding a event the “Link Business” does not appear neither does it appear when I want to edit a event in the backend.

    #414604

    Guust
    Moderator
    Post count: 29970

    From https://wpgeodirectory.com/docs/linking-events-to-places/

    You will need: … The Pricing Manager activated…

    Have you?

    To enable shortcodes in an HTML field added in a Fieldset, add this code snippet:

    
    
    add_filter('geodir_tab_show_geodir_XXX','my_enable_shortcodes_on_field',10,2);
    function my_enable_shortcodes_on_field($html, $variables_array){
       return apply_filters('the_content', $html);
    }

    Replace XXX with the HTML variable name of your HTML field.
    Keep the HTML field admin only, do NOT give your users access to it, it is a security risk.

    #414606

    Dane Elsdon
    Free User
    Post count: 27

    Guust.

    Thank you for your time and effort. I have added the code to the functions.php with the HTML variable. It is now working perfectly as I wanted it to work.

    You can have a look at the screenshot to see the result.

    Thank you once again. I really appreciate the support. Every time I have an issue then the support manages to help me out. I gladly appreciate it.

    Hope you have a wonderful day on-wards and keep up the good work.

    Kind regards,
    Dane

    #414608

    Guust
    Moderator
    Post count: 29970

    You’re welcome 🙂

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