How do i get all author posts on custom post type list

The author key/value query won’t work. Try modifying the query by moving the query out of the meta query like so: array( ‘author’ => $author, ‘meta_query’ => array( ‘relation’ => ‘OR’, array( ‘key’ => ‘leads_status’, ‘value’ => ‘-1’, ), array( ‘key’ => ‘leads_status’, ‘compare’ => ‘NOT EXISTS’, ) ) )

Widget Script Loads at Bottom of Page

That’s expected behaviour, since you’re calling wp_enqueue_script mid-page, so at that point the <head> ship has sailed, and the only other option is to enqueue in the footer, which is fine. I didn’t spend too much time reading the actual script that you’re enqueuing, but it seems like it it’s doing some document.write() as soon … Read more

auto create only 1 wp page in activate custom plugin

register_activation_hook( __FILE__ , ‘my_plugin_install’); function my_plugin_install() { global $wpdb; $the_page_title=”Book”; $the_page_name=”book”; // the menu entry… delete_option(“my_plugin_page_title”); add_option(“my_plugin_page_title”, $the_page_title, ”, ‘yes’); // the slug… delete_option(“my_plugin_page_name”); add_option(“my_plugin_page_name”, $the_page_name, ”, ‘yes’); // the id… delete_option(“my_plugin_page_id”); add_option(“my_plugin_page_id”, ‘0’, ”, ‘yes’); $the_page = get_page_by_title( $the_page_title ); if ( ! $the_page ) { // Create post object $_p = array(); $_p[‘post_title’] … Read more