Modify Output for Related Events – 2

Home Forums Calendar Products Events Calendar PRO Modify Output for Related Events – 2

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #165243
    helloodds
    Participant

    Hi there,
    I’ve been following the thread here: https://theeventscalendar.com/support/forums/topic/modify-output-for-related-events. I’m trying to essentially change my post thumbnail from large to thumbnail. The code from the pastebin works in regards to making that specific change, but unfortunately it’s doing two things that I can’t seem to correct:
    1. My original tribe_single_related_events code is still appearing on the page, even though I thought I was disabling it with the remove action command.
    2. My new code isn’t honoring the count. Although it states 3, it’s including ALL related events.

    See the pastebin: http://pastebin.com/tpa23mam

    Thanks for your help.

    #166427
    Casey D
    Member

    Hello helloodds,

    Thanks for contacting us!

    The plugin has since been updated, so to remove the current action you’ll need (be sure to clean up apostrophes!)

    remove_action('tribe_events_single_event_after_the_meta', array( TribeEventsPro::instance(), 'register_related_events_view' ) );

    That might fix your ‘count = 3’ problem also.

    Does this make sense? Let me know if this doesn’t work for you.

    Cheers!

    – Casey Driscoll

    #166449
    helloodds
    Participant

    Hey – thanks so much! That resolved my original still showing, but it’s still showing a long list of related items, instead of only 3. Here’s my new pastebin: http://pastebin.com/yWU0r3JD

    Thanks a bunch for your help.

    #167931
    Casey D
    Member

    Hello helloodds,

    I don’t think the ‘$count = 3’ default param isn’t catching, by nature of the function call, so there is no query size (it pulls everything then).

    If you move the $count = 3 param to the line below, it should work.

    28 function custom_tribe_single_related_events() {
    29    $count = 3;
    30   $posts = tribe_get_related_posts( $count );

    Does this make sense? Let me know if this doesn’t work for you.

    Cheers!

    – Casey Driscoll

    #167958
    helloodds
    Participant

    Perfect! That worked – thank you so very much.

    #168160
    Casey D
    Member

    Hello helloodds,

    Happy it worked out!

    We’d love it if you would leave us a review and let people know how much you like the plugin! http://m.tri.be/jt

    I’ll go ahead and close this thread. Let us know if we can help with anything else.

    – Casey Driscoll

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Modify Output for Related Events – 2’ is closed to new replies.