Default image when using Main Post Loop

Home Forums Calendar Products Events Calendar PRO Default image when using Main Post Loop

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #28213
    Allis
    Member

    Hey…
    I have using the following link:
    https://theeventscalendar.com/show-your-events-in-the-main-post-loop/

    In order to implement the events into the main posts. Where i have a default image for the standard posts.
    My question is, if there is a way i can identifi which posts are from “The Events Calendar PRO”, so i can assign a default image(thumbnail) to these posts.

    I hope you can help me. Thanks
    Per K. Jørgensen

    #28231
    Barry
    Member

    Hi Per.

    I would think you could use the tribe_is_event() function to detect if the post is an event or not. You can either use it without any parameters and it will assume you are referring to the current post, or you can explicitly pass in a post ID:

    if (tribe_is_event($post->ID)) { /* Do magic */ }

    Does that help here?

    #28246
    Allis
    Member

    Of course…
    Thanks for the answer Barry 🙂

    #978194
    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 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Default image when using Main Post Loop’ is closed to new replies.