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 demoed ACF 6.1 Beta during the most recent session of ACF Chat Fridays, highlighting the new ability to regenerate and clear labels, setting the Admin Menu Parent as a slug, and more. Catch the video replay in our latest summary. https://t.co/rHEpPVas64 pic.twitter.com/hB1XKTexXi
— Advanced Custom Fields (@wp_acf) March 23, 2023
© 2023 Advanced Custom Fields.
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.