Posted: May 7, 2017 at 4:58 am
|
Hi there, I’m trying to get one of my pages to display a super simple text list of upcoming events and came across this forum post, which looks perfect: https://gist.github.com/joshfeck/6e33532c37a123bbf532 However, just not sure how I can get this to show on one page only. I want to keep all my existing pages and templates, etc. But on one of the pages I want to show this list. What method is the best to get this done? Thanks for any help. |
Hi there, You can use the code from the example gist and put it into a custom page template. Then when you set up the page in the WordPress editor, you select that page template. This guide will walk you through the process: http://www.wpbeginner.com/wp-themes/how-to-create-a-custom-page-in-wordpress/ |
|
|
Gotcha, thank you, figured it out, thanks for the direction. |
|
Sorry, one more thing, I tried to get the event date to go along with the event name, but can’t seem to figure out which hook or tag to use. I tried these, but it just showed numbers: How can I get the date to show as well? Thank you. |
Returns and
|
|
|
Thanks for the help, but I can’t for the life of me figure out where to put each of these (PHP is definitely not my strong suit). This is where I put them but definitely not right. Seems no matter where I put this I can’t get it to work: $primary_datetime = $event->primary_datetime(); This is what I have right now:
Can you point out where I’m going wrong? Thanks so much for the help thus far. |
You don’t have an Try this:
Note: I haven’t tested this. |
|
The support post ‘Simple event list on one page’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.