WordPress.org

Forums

Events Manager
[resolved] Custom placements in .php file (10 posts)

  1. nashakaratv
    Member
    Posted 1 year ago #

    Hi,

    I am trying to add in the events date and and venue onto my home page.
    When I use the placeholders " #d #M #_EVENTNAME " it doesn't seem to work.

    Do I need to add a template include in order to reference these placholders in my .php file and if so, where do I start?

    example: http://icecreamcity.supamusiconline.com/

    Thanks,
    L

    https://wordpress.org/plugins/events-manager/

  2. caimin_nwl
    NetWebLogic Support
    Posted 1 year ago #

    Hi,

    No, there's no need to run an include. Can you post the code you're using?

  3. nashakaratv
    Member
    Posted 1 year ago #

    Hi

    here is the site I am trying to add the dates to:

    http://icecreamcity.supamusiconline.com/

    it comes up as #d #M #_EVENTNAME instead of the actual values.

    That is all I am using to try and display dates etc #d #M #_EVENTNAME

    Thanks,

  4. caimin_nwl
    NetWebLogic Support
    Posted 1 year ago #

    Are you using WP admin to add the placeholders or are you adding them to directly to your PHP template?

    Can you post the code exactly as you're using it? Thanks.

  5. nashakaratv
    Member
    Posted 1 year ago #

    Hi,

    I am adding it directly into my PHP template.

    The code is:

    <h2 class="heading2">Events</h2>

    <div class="leftwidgets">

    <div id="eventsdate"><span style="font-size:38px;margin-top:8px">#d</span>
    #M </div>

    <div id="eventswidget">#_EVENTNAME

    <div class="buytickets">BUY TICKETS</div></div>

  6. nashakaratv
    Member
    Posted 1 year ago #

    Where it says #d ( I would like just the date to display)
    where it says #_eventname (name of event to should display)
    where it says buy tickers (ideally, I would like to have a link which would take you straight to that post)

    Ideally I would like this to show, the the next upcoming event.
    1 after the other.

    So once the date has expired for this event, it should get the next upcoming event automatically.

    But only display this in the format I have pasted above.

  7. caimin_nwl
    NetWebLogic Support
    Posted 1 year ago #

    Is there any reason you need to add it directly to the template? If you use the code directly in the page it should work fine. Try something like this:

    [events_list]
     <div id="eventsdate"><span style="font-size:38px;margin-top:8px">#d</span>
    #M </div>
    
    <div id="eventswidget">#_EVENTNAME
    
    <div class="buytickets">BUY TICKETS</div>
    [/events_list]
  8. nashakaratv
    Member
    Posted 1 year ago #

    Hi

    That doesn't seem to work at all.

    I have placed the code in the page itself and it works.

    However, its now showing all events.
    I would only like it to display 1 event i.e. the next event occurring.

    Any idea how to do this?

    Please see the site to see what is happening:
    http://icecreamcity.supamusiconline.com/

  9. caimin_nwl
    NetWebLogic Support
    Posted 1 year ago #

    Try replacing the first line of the code above with this:

    [events_list limit=1 recurring=1]

  10. nashakaratv
    Member
    Posted 1 year ago #

    Hi Caimin,

    using the "recurring" tag didn't work.
    However, by just removing that tag and keeping:

    [events_list limit=1]

    Pretty much done what I needed.

    Thank you for your help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic