Page ID of pages outside the loop

Home Forums Calendar Products Events Calendar PRO Page ID of pages outside the loop

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #946457
    Nicola
    Participant

    Hello, is it possible to find out the wordpress page ID of the /events/ page, which is created outside the blog loop so there is no entry in wordpress under pages?

    I would like to know it because I want to exclude a widget from that page.

    Kind regards,
    Nicola

    #946510
    Geoff
    Member

    Hello there, Nicola!

    Good question. The calendar at /events is actually a custom post type archive, so it technically does not have a Page ID.

    If you’re trying to exclude a widget from it, you can do so by target it as an archive rather than a page:

    <?php
    if ( is_post_type_archive("tribe-events") ) {
    // Remove the widget
    }
    ?>

    Cheers!
    Geoff

    #950153
    Geoff
    Member

    Hi there,  Nicola! This thread’s been quiet for a while, so I’m going to go ahead and close it. Please feel free to start a new thread if any other questions pop up and we’d be happy to help. 🙂

    Cheers!
    Geoff

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Page ID of pages outside the loop’ is closed to new replies.