Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi,

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

    Thread Starter Luvlymedia

    (@nashakaratv)

    Hi

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

    https://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,

    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.

    Thread Starter Luvlymedia

    (@nashakaratv)

    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>

    Thread Starter Luvlymedia

    (@nashakaratv)

    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.

    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]
    Thread Starter Luvlymedia

    (@nashakaratv)

    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:
    https://icecreamcity.supamusiconline.com/

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

    [events_list limit=1 recurring=1]

    Thread Starter Luvlymedia

    (@nashakaratv)

    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.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Custom placements in .php file’ is closed to new replies.