Home › Forums › Calendar Products › Events Calendar PRO › Determing If Page is a Calendar Page
- This topic has 5 replies, 3 voices, and was last updated 8 years, 6 months ago by Support Droid.
-
AuthorPosts
-
October 24, 2015 at 7:57 am #1017603VictoriaParticipant
How do I go about determining if the current page is one of the Calendar pages (month or list)?
If I use get_the_ID(), it oddly returns the page ID of the first event on the calendar page….not the top-level/parent page ID.
Is this a glitch? Is there another way to check?
Thanks.
October 26, 2015 at 7:00 am #1017855BrianKeymasterHello,
Thanks for using our plugins. I can help out here.
The main views of Month, List, Map, etc are archives in WordPress so they do not have an id to the get_the_id() will not work as you found out. That is not a glitch, but a result of the setup for the views.
I have this list of conditionals for you to determine what view you are on:
https://gist.github.com/jo-snips/2415009
Let me know if that helps.
Thanks
October 26, 2015 at 5:46 pm #1018739VictoriaParticipantThanks, but this doesnt really help since those conditionals are only available after the EC code is being initialized/generated – and not beforehand via the theme’s functions.php
I want to be able to change some theme elements if the month/list pages are being viewed. Heck, any of the public EC pages really.
October 27, 2015 at 5:30 am #1018802BrianKeymasterHi,
I use them all the time in the theme’s functions.php you have to load them inside of WordPress’s action and filter system to work correctly.
http://codex.wordpress.org/Plugin_API/Hooks
That is all we have for conditionals too.
October 27, 2015 at 5:34 am #1018804BrianKeymasterIf that is not going to work for you. We do have a themer’s guide where you can move and edit any of the event templates in your theme:
November 11, 2015 at 6:05 am #1024137Support DroidKeymasterThis 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. -
AuthorPosts
- The topic ‘Determing If Page is a Calendar Page’ is closed to new replies.