How does /events/ work?

Home Forums Calendar Products Events Calendar PRO How does /events/ work?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #18947
    David
    Member

    The events calendar is featured at http://www.website.com/events but I noticed that there is no page for events nor is there anything in .htaccess.

    I ask as the calendar on the /events/ page is bypassing the html for the page. A standard page (the site is in early stages of development so all pages are running off index.php) features three columns however the calendar spans the whole page.

    Looking at the generated source code of the page, everything is stripped out of the index.php file on the events page, leaving only get_header(); and get_footer(); running.

    This in itself is fine as the calendar needs to span the entire width, however it throws the formatting of the page slightly. So I need to wrap the calendar in a div before the Calendar of Events tag. Oh and is it possible to make the h2 a h1 as that is the first header on the website.

    #18957
    Jonah
    Participant

    Hi David,

    The plugin works by creating internal rewrites to create a virtual page in the background. The reason we went with this route is to make the plugin as plug and play as possible so users don’t need to mess with shortcodes and creating the page…

    There are a few things you can do to get more control over the template that is displaying the calendar and events list.

    1. You can wrap those pages in whatever HTML you want by visiting Settings > The Events Calendar > Template and inputting the before and after HTML for any wrappers you might need to include.
    2. You can change the Events Template on the same settings page to determine what template is used for the main event pages. There is the Default Events Template which uses /wp-content/plugins/the-events-calendar/views/ecp-page-template.php which you can completely customize and add your HTML wrappers or other PHP/code as needed. Make sure if you want to edit this file that you make a copy and place in an ‘events’ folder in your theme first. Other than the Default Events Template you should have all your themes page templates in that drop down that you can select from and again edit to your liking to include specific code for the events pages.

    I’ve created some conditional PHP wrappers for re-use that you might find helpful for conditionally using code on events specific pages: https://gist.github.com/2415009

    I hope that helps but let me know if you have any other questions.

    Cheers,
    Jonah

    #976775
    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 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How does /events/ work?’ is closed to new replies.