Pasting this PHP breaks my page. Why?

Make sure you reference the global $wpdb variable first, otherwise PHP doesn’t know what $wpdb is or whether or not it has a get_results() method or a prefix property. So just add global $wpdb; to fix it: <?php global $wpdb; $gallery_ids = $wpdb->get_results( “SELECT gid FROM “.$wpdb->prefix.”ngg_gallery ORDER BY gid ASC”, ARRAY_A); ?>

WordPress Following? Social Users?

I don’t know if you know about BuddyPress or not, but they have a plugin that will help you in your quest. It is called BuddyPress Followers which allows users to follow peoples activity. It should have options in it to only follow posts and whatnot. BuddyPress also makes WordPress more “Social”

is_front_page breaks with url parameters generated by a plugin

I’m not sure if lang is a reserved/used query variable in WordPress, but if it’s not, then adding might help. Use a filter on query_vars like this: function my_query_vars( $vars ) { $vars[] = ‘lang’; return $vars; } add_filter( ‘query_vars’, ‘my_query_vars’ ); Although WordPress will now know about the language query variable, I’m not sure … Read more

Multiple Post Thumbnails Plugin – Need help with code

Here is a complete example using the code you provided: For your functions.php file: <?php // Add secondary thumbnail (featured image) in posts */ if (class_exists(‘MultiPostThumbnails’)) { new MultiPostThumbnails(array ( ‘label’ => ‘Secondary Image’, ‘id’ => ‘secondary-image’, ‘post_type’ => ‘post’ ) ); new MultiPostThumbnails(array( ‘label’ => ‘Quaternary Image’, ‘id’ => ‘quaternary-image’, ) ); new MultiPostThumbnails(array( … Read more