Is it possible to delete post/page revisions from the database when a post/page is published? 11/05/12 Answer: See the plugin below by bueltge I want to do this on...
I need to display an avatar in the post info position which i have written the code for but i only want to display it on the most recent...
I use the code snippet below to get views count of each post on my sidebar.php . everything works but the sorting does not. also it does not get...
I’m trying to figure out how to do this. I have many posts. I want it so that when someone pulls up the site, the front page shows all...
I am trying to delete records from my custom table but it does not delete anything. Here is my code: <?php global $wpdb; $retrieve_data = $wpdb->get_results( "SELECT * FROM...
Here is the my custom query ; <?php $Poz = new WP_Query(array( 'posts_per_page' => 3, 'orderby' => 'date', 'order' => 'DESC', 'no_found_rows' => true, 'update_post_term_cache' => false, 'update_post_meta_cache' =>...
I am running code that shows child categories, and all posts in the child categories. But if there are more than 5 posts in a category, only the 5...
I am trying to get some data from WordPress database tables in a plugin. For that, I am using the below code… global $wpdb; $findID = $wpdb->get_var("SELECT ID FROM...
How can I check if post with name for example Weather exists? If not I want to create it. function such_post_exists($title) { global $wpdb; $p_title = wp_unslash( sanitize_post_field( 'post_title',...
I am using custom php code to perform data insertion, deletion, updating and other tasks. I am able to insert data into a table in two different ways, $wpdb->insert($table_name,...