Home › Forums › Bug Reports › Relationship issue with tribe_events custom post type › Reply To: Relationship issue with tribe_events custom post type
this does not work for me.
acf/fields/relationship/query
seems only have effect on select list, not on value list
my already tribe_events linked objects are not well displayed if they are in past.
this is due to the admin
context set in eventDisplay
wpQuery argument.
My solution was to change eventDisplay
directly on pre_get_post
filter like described bellow :
function load_all_relational_events( $query )
{
if (is_admin() && $query->tribe_is_event) {
$query-/set('eventDisplay', 'all');
}
}
add_filter('pre_get_posts', 'load_all_relational_events');
hoping will help 😉
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.