Display Event Calendar Pro on homepage

Home Forums Calendar Products Events Calendar PRO Display Event Calendar Pro on homepage

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #20360
    Tony
    Participant

    Hi,
    I would like to put the event calendar on the homepage.
    I’ve looked through the documentation on tags and don’t understand it unfortunately.
    Is there a simple way to achieve putting EC on the homepage?
    Thanks for your help.

    #20381
    Rob
    Member

    Hey Tony. Thanks for the note here. As it stands, template tags (as detailed on the documentation page you checked out, https://theeventscalendar.com/support/documentation ) are the only way to display event details on the homepage.

    Which aspect of the documentation are you unclear on? We can help elaborate if you give us a heads up. You also may want to check out the themer’s guide that we just published (https://theeventscalendar.com/themers-guide-to-the-events-calendar/) which may be of some value.

    Let us know what you’re stuck on and we’ll do what we can to assist.

    #20404
    Tony
    Participant

    Rob, thanks for the reply.
    I don’t know what to do with the template tags or which one to use to get the calendar/list view to show up.
    On the documentation page there is just a list with no instructions on how to use them.
    Sorry, I am a beginner so never used template tags before.

    #20405
    Tony
    Participant

    Can anyone help with this please?
    I just want it to show up on the homepage.
    Anyone here???

    #20415
    Jonah
    Participant

    Hi Tony,

    The easiest way to do this would be to include the gridview in your theme’s template files. Try editing your theme’s page.php file and placing this next to where the_content() is called:

    if(is_front_page()) {
    include('wp-content/plugins/the-events-calendar/views/gridview.php');
    }

    In order for this to work you do need to have an actual Home page created as a page and set as the Front Page in Settings > Reading.

    I hope that helps, but let us know if you need anything else.

    – Jonah

    #20419
    Tony
    Participant

    Jonah
    Thanks for the help.
    I have put it in the page.php file and it is appearing on the homepage now.
    However, it is now goes by default to the calendar (not list view) and when you click on the “event list” or “calendar” buttons at the top, these buttons redirect to ‘myurl.com/events/upcoming’ and ‘myurl/events/month’.
    Is there a way to get the “event list” view (upcoming events) to be the default view and for the two buttons not to redirect to these subpages when clicked?
    Many thanks.

    #20451
    Jonah
    Participant

    Hi Tony,

    The only way I can think of to get the events list on the home page is to setup a custom query pulling in your upcoming events, and styling everything to look like the other events list. There are numerous examples of custom queries in the forums if you search around a bit and we have examples in the documentation as well: https://theeventscalendar.com/support/documentation/

    I hope that helps,
    Jonah

    #20617
    Tony
    Participant

    Can you tell me which template tags I need to use in order to display the events list view with a button to display the calendar view.

    Also, can you tell me how to use these tags. I don’t see any examples or explanation anywhere and nothing seems to come up in the search.

    #20638
    Jonah
    Participant

    Hey Tony,

    There’s no specific template tag for displaying the same list you see when going to the auto generated events list. You’ll need to use the tribe_get_events() function (https://theeventscalendar.com/support/documentation/the-events-calendar-template-tags-general-functions/#functiontribe_get_events) to put together a custom query and then style the query results to get them looking the way you want. There are a few examples in the documentation to give you an idea of how to use this function.

    I hope that helps!

    – Jonah

    #977083
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Display Event Calendar Pro on homepage’ is closed to new replies.