How to add custom fields in rss feed

I have a custom field called argument. I’m trying to add it in RSS feed using the following code, but it’s not working. Am I missing something? function acf_feed($content) { if(is_feed()) { $post_id = get_the_ID(); $output=”<acfArgument>” . get_post_meta($post_id, “argument”, true) . ‘</acfArgument>’; $content = $content.$output; } return $content; } add_filter(‘the_content’,’acf_feed’); I added this function to … Read more

How to use max and min values of custom fields

How to use max and min values of custom fields (created via ACF, repeater type)? For axample, I’ve custom post type ‘auto’ and there are a lot of models. Each post(model) has few values of price (from different salon). These fields for price created via ACF, repeater type. Also, I’ve page to display all of … Read more

Can an array be used as a meta_query value?

I’m trying to query a custom post type (courses) by grade using WP_Query and Advanced Custom Fields (ACF). Grades (checkboxes) are organized by term (groups). Four grades per term, four terms per course. Here are the ACF fields in the CMS (‘Term Status’ can be ignored for the purposes of this question): So depending on … Read more

ACF attachment custom field in rest response

I created an extra select option ACF field for media uploader and I would like to retrieve the associated values in Gutenberg MediaUploader onSelect. Is there a workaround for this case? 1 Answer 1 Check out ACF to REST API – https://github.com/airesvsg/acf-to-rest-api You can optionally turn on/off which fields you want to enable. // Enable … Read more

Remove WordPress/Gutenberg button styles for ACF blocks

Is there a way to remove the default styling of the gutenberg editor? I am building a custom theme using ACF blocks, part of one of the blocks has a button that is being displayed from the template file. <button type=”button” class=”button”>Button Text</button> Everything on the front end looks fine and my styles for “.button” … Read more