Good day,
So I have a “customers” page with a Masonry Entries element showing all customer logo’s. Now I would also like to show their respective quotes beneath the logo. This can be done in the settings by showing the Excerpt field, but the thing is, for other reasons I’ve created a custom field “Customer quote” and would need to find a way to show this field instead of the excerpt.
Inside the details page of a customer, I’ve already managed to show this field using the following code:
$customerquote = types_render_field("customer-quote", array("raw"=>"true","separator"=>";"));
Now my question is, can I add some code to make it show this field? If possible, only when the Masonry Entries element has a specific class assigned to it so it doesn’t affect all Masonry Entries elements on other pages (for ex. have some to present News posts and Partners as well).
Thanks in advance!
Hi DavyE!
Thank you for using Enfold.
You can use the “avf_masonry_loop_prepare” filter. Example:
// https://kriesi.at/support/topic/inject-category-name-into-masonry-element/#post-615662
// https://kriesi.at/support/topic/custom-post-type-created-with-toolset-types-to-show-read-more-tag/#post-649532
This filter in combination with the get_post_meta function. https://developer.wordpress.org/reference/functions/get_post_meta/
Regards,
Ismael