ACF Filter return value
I am not sure it is supposed to work like this. Maybe try calling the get_field like this. If the get_field is not called within the loop, it needs the post_id parameter $soups = get_field(‘soups’, $post_id )
I am not sure it is supposed to work like this. Maybe try calling the get_field like this. If the get_field is not called within the loop, it needs the post_id parameter $soups = get_field(‘soups’, $post_id )
Okay, I fixed it. The final code is: <?php $args2 = array(‘post_type’ => ‘etlap’, ‘posts_per_page’ => 5, ‘post__in’ => $ids, ‘order’ => ‘post__in’); $query2 = new WP_Query($args2); ?> <tr> <td> <?php echo “Levesek” ?> </td> <?php if ($query2->have_posts()): ?> <?php while ($query2->have_posts()): ?> <?php $query2->the_post(); ?> <td> <?php $levesek = get_field(‘levesek’); $leves_adag = get_field(‘leves_adag’); ?> … Read more
Returning incorrect $post->ID after installing plugin
Populate ACF repeater with current structure of pages
Managed to solve this my self. The solution was as simple to just call the comments template. Think I originally messed up by calling the template twice if ( comments_open() || get_comments_number() ) { comments_template(); }
Generate a radius search of custom post type locations
After searching through two dozen blog posts I was able to combined several approaches and make this work. function my_search_by_title_only( $search, $wp_query ) { if ( ! empty( $search ) && ! empty( $wp_query->query_vars[‘search_terms’] ) ) { global $wpdb; $q = $wp_query->query_vars; $n = ! empty( $q[‘exact’] ) ? ” : ‘%’; $search = array(); … Read more
The slug you use for the CPT looks very weird. You should inspect the rewrite rules being used in parsing a request with something like the query monitor plugin, but the gut feeling is that your CPT slug makes all URLs to match it and since there is no CPT for the URL of a … Read more
wp_dropdown_categories() will produce a select element with the default name and id of cat. You can change these by passing different values for id and cat in the $args array. The default value it uses is the term_id. Depending on what you’re expected to use in the get_field() function, you can also change that in … Read more
You get the author ID of the post ID via get_post_field $post_author_id = get_post_field( ‘post_author’, $post_id ); With this post ID you get all author meta data, also the name like the_author_meta( ‘display_name’, $post_author_id );