Enabling XSendFile causes 404 for images on WordPress Multisite / Network

It wasn’t a .htaccess problem, but an apache configuration problem. On a Mac server you need to: compile XSendFile as a universal binary: apxs -cia -Wc,”-arch i386 -arch x86_64″ -Wl,”-arch i386 -arch x86_64″ mod_xsendfile.c and modify the site specific httpd.conf file in /Library/Server/Web/Config/apache2/sites. If you’re having the same problem, I wrote about this on my … Read more

How to mark every 3rd post

My approach. No extra function, no filter. 🙂 <?php $GLOBALS[‘wpdb’]->current_post = 0; ?> <div <?php post_class( 0 === ++$GLOBALS[‘wpdb’]->current_post % 3 ? ‘third’ : ” ); ?>> Alternative: <div <?php post_class( 0 === ++$GLOBALS[‘wpdb’]->wpse_post_counter % 3 ? ‘third’ : ” ); ?>>

Unable to pass variable

Credit goes to Bainternet <?php query_posts( array(‘post_type’ => array(‘post’),’order’ => ‘DESC’,’posts_per_page’ => $entry) ); ?>

MYSQL Join on meta key value?

You can update just joining both table on comparing same userid. like: update t1 join t2 on t1.user_id = t2.user_id set t1.meta_value = t2.desc;