The remaining question I have might be a bit trickier though.
As you saw in the code, we have three data- tags (data-item-type, data-capabilities, data-people) on the parent div which we use for filtering/sorting on the page. I can load the event category into the data-item-type fine but the data-capabilities and data-people tags will take more action.
On the events CPT we have two ACF relationship fields which load dynamically in the list of practice areas and attorneys so we can toggle on the capabilities and people associated to the event. These are categories that we allow the page to filter on so I need to get the values from the ACF fields loaded.
The relationship fields are setup via the Advanced Custom Fields plugin.
I want to load the values from the ACF into the Views Template. I tried adding [wpv-post-field name="practice_areas"] to the view template but nothing is being returned.
So it is a compatibility problem between Advanced Custom Fields plugin, please provide a copy of your website, also point out the problem page URL, problem custom field, how and where do you want to display it.
I need to test and debug it in my localhost https://toolset.com/faq/provide-supporters-copy-site/
Luo is on vacation. This is Minesh here and I'll take care of this ticket and try to help you further to achieve solution you were looking for. Hope this is OK.
I try to download the file but it takes ages - could you please upload the file on some file sharing service like google drive or dropbox and send me a link to download the file.
I have set the next reply to private which means only you and I have access to it.
Well - I installed the duplicator on my localhost and now I would like to know what you need to display and where exactly.
To query repeatable fields group items you can use the Types PHP API function toolset_get_related_posts() .
For example:
$results = toolset_get_related_posts(
$post->ID, // the parent post
'columns-layout', // the RFG slug
'parent', // the RFG role in this relationship is 'child'
100, // the maximum number of results
0, // the offset
array('meta_key'=>'toolset-post-sortorder'), // additional query arguments
'post_object', // return format
'child', // role to return
'meta_value_num',
'ASC'
);
I'm back from vacation. Thanks for downloading and setting up the site. Here's a breakdown of what I'm trying to do.
On this page, hidden link, I'm using the View "Display Events on Events page" and "Display Past Events on Events page" for this page which look like this:
As you can see in the code, we have three data- tags (data-item-type, data-capabilities, data-people) on the parent div which we use for filtering/sorting on the page. I can load the event category into the data-item-type fine but the data-capabilities and data-people tags will take more action.
On the events CPT we have two ACF relationship fields which load dynamically in the list of practice areas and attorneys so we can toggle on the capabilities and people associated to the event. These are categories that we allow the page to filter on so I need to get the values from the ACF fields loaded.
How can I do this via the View Template section since we need to use that to tie into the repeatable groups for types or is there a different way to handle all of this via PHP directly?
Thanks for the example. Creating shortcodes is all new to me so I took your example and tried to find some other help docs to make it work but I haven't had any luck. It seems like something is being passed to the shortcode to generate the correct output as I am getting no output. Below is what I've added to the functions.php file:
I'm returning $pa_title test in an attempt to atleast get "test" to output, but that isn't happening. If I remove the if( $posts ): and foreach( $posts as $post): parts, I can get it to return a number and test (example: 1046 test). Looking into the database, 1046 seems to represent the RFG setup for that event so I'm guessing it's not passing the correct postid for the parent event? Any further ideas on how to get this to work or troubleshoot further to figure out what isn't working?
Alternatively if there's a way to setup this page using straight PHP rather then Views, I'm up for that too.
Is there someone there who I can talk with a little more frequently then once a day to try and get this wrapped up?
Well - I think we are so near. Could you please share wp-admin and FTP access details so I can look at it and also tell me what should be the expected value for data-capabilities with test case URL.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.