Populate ACF repeater with current structure of pages
Populate ACF repeater with current structure of pages
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 );
Echo a String Based On Geolocation? [Woocommerce || ACF]
I would look into adding a custom post column for that post type which shows the image you’d like to. See this link. edit: here’s a working example. function add_column_header_298736( $defaults ) { $defaults[ ‘image’ ] = ‘Image’; return $defaults; } add_filter( ‘manage_results_posts_columns’, ‘add_column_header_298736’, 20 ); function add_column_content_298736( $column_name, $post_id ) { if ( $column_name … Read more
You can use wordpress plugin – Advanced Custom Fields to set up your desired fields. https://wordpress.org/plugins/advanced-custom-fields/ To print custom field value, please refer plugin documentation.