Tag Info

New answers tagged

-3

If you want to add ACF form with content, by one click check out this plugin: https://wordpress.org/plugins/acf-frontend-display/screenshots/


-1

According to ACF Docs on Get values from an options page. You should use 'option' not 'options' as the second parameter to the have_rows() function. <?php if( have_rows('repeater', 'option') ): ?> <ul> <?php while( have_rows('repeater', 'option') ): the_row(); ?> <li><?php the_sub_field('title'); ...


1

The second parameter to wp_set_object_terms() takes an array, integer, or string. (array/int/string) (required) The slug or id of the term (such as category or tag IDs), will replace all existing related terms in this taxonomy. To clear or remove all terms from an object, pass an empty string or NULL. Integers are interpreted as tag IDs. ...


2

Implode turns your array like this array( 'Audi', 'BMW', 'Mercedes-Benz' ) into a string separated by the delimiter set in the first parameter of the function, in this case , a comma and a space. In a way you can turn an array into a CSV from this. The result is this: Audi, BMW, Mercedes-Benz. The way WordPress works, it looks for an existing term (within ...


5

I'm not 100% sure if I get your problem right, but... Maybe this will help you... Media uploader gets attachments with simple WP_Query, so you can use many filters to modify it's contents. The only problem is that you can't query posts with specific CPT as parent using WP_Query arguments... So, we will have to use posts_where and posts_join filters. To be ...


0

Ok, I did it another way. First, get all the terms for the taxonomy. If the term is equal to the value requested, put it into an array Then do the tax_query with this array. Final $argsc = array( 'order' => 'ASC', 'hide_empty' => true, 'fields' => 'all', ); $termsc = get_terms("cities", $argsc); $cities_array = ...


2

You need to pass in the ID of the post you're trying to get the field from: Eg get_field('display_featured_image', $post_id). In a loop you could do get_field('display_featured_image', get_the_id()); ACF Stores field data in wp's meta_fields, so you could even use WP's built in meta handler to pull the data yourself Eg: get_post_meta( $post_id, ...



Top 50 recent answers are included