Home › Forums › Calendar Products › Events Calendar PRO › Modify Output for Related Events – 2
- This topic has 5 replies, 2 voices, and was last updated 11 years, 11 months ago by
Casey D.
-
AuthorPosts
-
May 18, 2014 at 11:08 am #165243
helloodds
ParticipantHi 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.
May 19, 2014 at 11:58 am #166427Casey D
MemberHello 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
May 19, 2014 at 12:10 pm #166449helloodds
ParticipantHey – 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.
May 20, 2014 at 1:07 pm #167931Casey D
MemberHello 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
May 20, 2014 at 1:30 pm #167958helloodds
ParticipantPerfect! That worked – thank you so very much.
May 20, 2014 at 4:56 pm #168160Casey D
MemberHello 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
-
AuthorPosts
- The topic ‘Modify Output for Related Events – 2’ is closed to new replies.
