Minesh,
Thanks for continuing to work on this with me. It looks like we are close but there is still something funky going on.
Goto hidden link. You can see that the first event's details aren't being loaded however the data-capabilities are. The second event's details display but the data-capabilities do not. Seems like something within the shortcode function is causing the problem but I can't figure out where.
And it's odd because the staging version that you worked on is different.
hidden link
Neither of the events load their details but both load in their data-capabilities.
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Ok - I've adjusted the code again as given under:
function func_get_practice_areas2( $atts ){
global $post;
$post_id = $atts['pid'];
$posts = get_field('practice_areas',$post_id);
if( $posts ):
$pa_title = '';
foreach( $posts as $p):
$pa_title = $pa_title.get_the_title($p).' ';
endforeach;
endif;
return $pa_title;
}
add_shortcode( 'acf_practice_areas2', 'func_get_practice_areas2');
I see the posts just loads fine with all capabilities the post is assigned to:
=> hidden link
Minesh,
Excellent... that seems to be working now. Thanks for all your help!
Moving onto the next question.
We need to add events to the practice area pages but only events that are associated to that area. Inside Views there's no way to use the ACF relationship field in the Query Filter so how would we go about accomplishing this?
I need to query the events CPT, get the events that are associated to the Practice Area via the ACF relationship field and then display the events that are upcoming via the RFG's event date.
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Well - as your original issue is resolved which is reported with the original query.
Before this ticket become a ten page story, as per our support policy, we entertain only one question per ticket. May I kindly ask you to open a new ticket with your each new question. This will help other users searching on the forum as well as help us to write correct resolve ticket summery.
Additionally, I'm also totally opposite timezone, so once you create new ticket, you will get replies frequently from supporter working in your timezone.
Thank you for understanding and glad to help.
Minesh,
We've run into one small problem that I'm hoping you can help with.
Goto hidden link and click the button to View Past. Scroll to the bottom of the page. There are several instances where the content is empty but a row is displaying. Troubleshooting this a bit, it looks like these are events that were trashed but the RFGs are still being found and displayed in the list.
How can we make sure only active events are displayed here?
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Well - we should not continue like this. The ticket has been already become long.
I split the ticket to handle your new question with new ticket. Please feel free to close this ticket.
We will continue with new ticket here:
=> https://toolset.com/forums/topic/split-split-using-types-to-create-events-only-show-active-events-with-rfg/
Thanks for helping fix the issue!