How do you get Posts by multiple meta_keys and meta_values with the Rest API V2?

You can hook into the rest api query and add your args from url’s parameters The code will look something like: function query_post_by_fields($args, $request) { $url_params = $request->get_param; //Modify $args with your url params return $args; } add_filter(‘rest_post_query’, ‘query_post_by_fields’, 10, 2); Docs: https://developer.wordpress.org/reference/hooks/rest_this-post_type_query/

How to show the a custom taxonomy term on single post metadata

You might be able to use the the_author_posts_link filter to do this: add_filter( ‘the_author_posts_link’, functoin ($link) { global $post_id; // get “source” tax terms $sources = get_the_terms( $post_id, ‘source’ ); // build html $html=””; foreach ($sources as $source) { $html += ‘<a href=”‘. get_term_link($source) .'”>’. $source->name .'</a>’; } // pre-pend html to author link $link … Read more

Display a CPT based on a metabox selection

I got it to work by using the following code function get_gas_options($a) { $args = array( ‘post_type’ => ‘fleet’, ‘orderby’ => ‘ID’, ‘post_status’ => ‘publish’, ‘order’ => ‘ASC’, ‘posts_per_page’ => -1 // this will retrive all the post that is published ); $result = new WP_Query( $args ); $title_list[”] = “Assign a Vehicle”; if ( … Read more

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