New answers tagged

0

Try this one when you plan to change the current URL from controls panel: wp.customize.previewer.previewUrl( url ) or try this one while you intend to change the URL from preview frame: wp.customize.preview.send( "url", url ) Moreover, here is how to get the current preview URL from the controls panel: wp.customize.previewer.previewUrl()


1

This quite rare setup so it is hard to recommend one way or another. Having worked with comments before I would recommend to stick with WordPress API functions (wp_insert_comment() and so on) for manipulating them. While DB structure is indeed simple you don't account for all the hooks firing and other things that might be happening. For example once in ...


0

To order posts by meta fields you will need something like : $args = array( "meta_query" => array( array( "key" => "youtube-views", ), ), "orderby" => "meta_value" ); Where you should use the name of the database column as key, usually it should be specified in key - value pairs, but you should be able to ...


0

https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters <ul> <?php $item=0; $attr = array( 'post_type' => 'lyrics', 'date_query' => array( array( 'after' => '1 month ago' ) ), 'post_status'=> 'publish', 'meta_key' => 'youtube_views', 'orderby' => 'meta_value', 'order' ...


1

Take a look at a plugin called Better REST API Featured Image. It adds the featured image URL to the original API response.



Top 50 recent answers are included