Cleaning up bloated wp_postmeta table by removing multiple _thumbnail_id’s?
Cleaning up bloated wp_postmeta table by removing multiple _thumbnail_id’s?
Cleaning up bloated wp_postmeta table by removing multiple _thumbnail_id’s?
Your list.php file does not load any of the WordPress Core, at least there is no indication that it does based on the code you posted. Thus, WordPress classes and functions are not going to be available, hence the error. Merely having a file in the theme folder does not mean that WordPress will load … Read more
WordPress running SQL query to update database from form
$wpdb->insert() does not Insert record in a table
I needed this for a client recently (he wanted to do the same but be able to create a archive by himself in the wordpress backend) and couldn’t find a good plugin for it. It’s pretty easy to custom code this actually. You just need to make your install a network install and then place … Read more
Did either of you solve your issues with Woocommerce being slow? After some profiling, I determined it was PHP being slow, not SQL. Total query time: 0.05915s for 89 queries. Page generated in 22.00653s (99.73% PHP, 0.27% MySQL) With that info, nothing you change in the front end is going to solve anything.
Renaming admin user on multisite install by MySQL
Calculate average crossing post categories
You must use a temporary table and an alias: SELECT SQL_CALC_FOUND_ROWS * FROM meruca_posts WHERE ID NOT IN (SELECT ID FROM ( SELECT object_id as ID FROM meruca_term_relationships WHERE term_taxonomy_id IN (14) ) AS temp_object) AND post_type=”post” AND post_status IN (‘publish’,’private’) GROUP BY ID ORDER BY post_date DESC LIMIT 0, 10
First of all why you would need custom query for this basic functionality to get users, when WordPress has inbuilt function get_users(). Anyway for custom query, table name is defined as function custom_func(){ global $wpdb; $getTest = “SELECT * FROM $wpdb->users LIMIT 1”; $arrayReturned = $wpdb->get_results($wpdb->prepare($getTest)); } It’s $wpdb->users or $wpdb->post and not $wpdb->wp_users, what … Read more