WordPress $wpdb get posts from category and sort by custom meta

First, you shouldn’t use NOW() in select queries since NOW() returns the current date and time to the split second. In other words: This query will never land in the cache. And you can use the WP_Query with filter of posts_where eg: function filter_event_where( $where=”” ) { $date = date(‘Y-m-d’); $where .= ” AND posts.post_date … Read more

AJAX wp-mysql running too slow

When you call the database directly rather then using the $wpdb object its faster for a simple reason which is you only call the database, and the when you use $wpdb it loads extra functions and basically most of WordPress before you can use the $wpdb object. What you should try is to use the … Read more

paginate_links on custom query in admin – ‘sufficient permissions’ error

The last part of the URL is being treated as part of the page value.. /wp-admin/admin.php?page=user-feedback/user-feedback.php/page/2/ The bold part is your plugin page, so when you go adding parts onto that URL it’s considered to be part of that URL. If you use this instead it should work no problem. /wp-admin/admin.php?page=user-feedback/user-feedback.php&paged=2 Note: You can actually … Read more

Build index page from custom fields

my suggesting is going for a different way by using get_pages() for example $args = array( ‘meta_key ‘ => ‘Partner_Level’, ‘meta_value’ => ‘Gold’ ); $pageslist = get_pages( $args ); $pageslist should have all your posts in the “gold” level.

Creating an auto result search bar

Then “autoSearch.php” has this code: If that’s all there is, no wonder you get an error – WP isn’t even loaded! Add this to your functions.php isset( $_POST[‘autoSearch’] ) && add_action( ‘after_setup_theme’, ‘wpse_60353_autosearch’ ); function wpse_60353_autosearch() { // The autoSearch.php code you posted in your question exit; // All done, stop WP continuing } Now … Read more

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