• Resolved sshilo

    (@sshilo)


    For styling purposes, I use an IF statement in assigning a particular class to certain divs based on either pageid, category, etc.

    I need a way to reference the calendar page. I created a custom page template (calendar.php) and I use it to show the calendar on.

    If I run this code:

    global $template;
    print_r($template);

    It shows that that is the template being used, but if I add to my styling function the condition

    is_page_template(‘calendar.php’)

    it returns “false”.

    Is there an easier way to reference the page being used?

    Thanks

    http://wordpress.org/extend/plugins/the-events-calendar/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hey sshilo. Thanks for the note here; we can try and point you in the right direction here, certainly. Have you already checked out our documentation page (http://tri.be/support/documentation/) and the themer’s guide (http://tri.be/support/documentation/events-calendar-themers-guide/)? Best I can tell they should help get you where you need to be, but let me know if not.

    Thread Starter sshilo

    (@sshilo)

    I looked and could not find it. I tried changing it to

    is_page_template('/wp-content/plugins/the-events-calendar/views/ecp-page-template.php')

    or

    is_page_template('ecp-page-template.php')

    neither worked. Any help would be greatly appreciated.

    basically, I need to know what value under ‘is_page_template()’ would return a value of yes for

    Thanks for the follow-up, sshilo. This is outside my area of expertise but I can certainly get Jonah from our support team – who is far more code-minded than myself – to take a look here. We should be able to get you a response on this no later than tomorrow. Thanks for your patience so far and please let me know what else I can do in the interim.

    Hey sshilo,

    Here are some conditional wrappers that should help you out: https://gist.github.com/2415009

    Let me know whether or not that works for you!

    Cheers,
    Jonah

    Hi again sshilo. Just wanted to check on this; need anything else from us after reviewing Jonah’s last comment here?

    Thread Starter sshilo

    (@sshilo)

    roblagatta, will try it today and update asap. TY Jonah.

    Thread Starter sshilo

    (@sshilo)

    that worked great!! TYVM you two!

    Excellent to hear! Thanks for confirming, sshilo. Glad to be of service…if you need anything else in the future, please let us know. Similarly if you find yourself with a few minutes and would be willing to write us a review on the new Reviews page here at the dot-org forum, it’d mean the world to us!

    Thanks again for your support and for using The Events Calendar.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Reference Calendar Page in Function’ is closed to new replies.