post__in for get_posts with a dynamic array

Here’s one way by using wpdb::get_col() and fetch the id column: $pids = $wpdb->get_col( “SELECT id FROM my_table” ); We could then clean it by integer convert each id with: $pids = wp_parse_id_list( $pids ); Just note the different max value for intval(), depending on 32 or 64 bits systems.

Moving WordPress to new server: no posts found

Reset permalinks at Dashboard>>Settings>>Permalinks and be sure WP says it was able to make changes to the .htaccess file, or make the changes yourself it fails to write to .htaccess. Did you change installed directories? I.e., from /wordpress/ to root? If so, see http://codex.wordpress.org/Moving_WordPress And if you moved to a Windows IIS server, be sure … Read more

RSS for Pages Instead of Posts?

You can includes pages inside your RSS feed by adding this code into your theme or child theme’s functions.php file (Child theme is preferred so it doesn’t get removed with updates). I tested this on a fresh install and it works. You can easily test by going to yourdomain.com/feed/. function feed_request($qv){ $rss_post_types = array(‘post’, ‘page’); … Read more

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