WordPress WP_Query Sort by 2 dates – custom fields

I’m not clear on whether you’re looking for one big query that returns all the ‘track_trip’ and ‘training’ posts, sorted by the two different custom meta fields, or two separate queries. But either way, you’ll need to use a custom meta_query. You will probably also need to orderby meta_value_datetime. Note in the “‘orderby’ with multiple … Read more

How can I get values from a custom post type depending on where I click on my SVG map?

This question will probably be marked off-topic because you’re asking about a plugin, Advanced Custom Fields, but here’s the answer anyway – you need to add the ‘post id’ to your call of the_field(), so that it’s looking up the custom fields set in each of your custom post type’s posts. See https://www.advancedcustomfields.com/resources/how-to-get-values-from-another-post/

Display posts from specific slug of the custom taxonomy in WordPress

I would recommend becoming intimately familiar with the WP_Query parameters: https://developer.wordpress.org/reference/classes/wp_query/ In your particular case; dealing with taxonomies: https://developer.wordpress.org/reference/classes/wp_query/#taxonomy-parameters Here is the proper code to pull from a taxonomy: $args = array( ‘post_type’ => ‘post’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘units’, ‘field’ => ‘slug’, ‘terms’ => $term->slug ), ), ); $query = new WP_Query( … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)