Display tags that only appear in one category

This loop starts by fetching all posts in given category. then goes through each tag of current post, fetches the posts for each tag, and if all of the posts have 0 or 1 category, prints that category. So, if you have lots of tags, lots of posts, this could be slow-ish. function wa_60126_pl8_artist_list($catname) { … Read more

Incorrect redirect after commenting

Actually, it looks like a problem being caused by the ReCAPTCHA plugin. Have you tried turning that plugin off? CAPTCHAs are generally ineffective for comments anyway. They prevent spam to some degree, but they prevent real-people even more, and are terrible for accessibility. A better way to fight spam is to use plugins that don’t … Read more

Dashboard widget custom positioning?

The dashboard widget function wp_add_dashboard_widget() is just a wrapper for add_meta_box(). So you can use the underlying function instead. add_meta_box( ‘my_comments_user_dashboard_widget’ ,’My comments’ ,’dashboard_user_comments_widget_function’ ,$screen // Take a look at the output of `get_current_screen()` on your dashboard page ,’normal’ // Valid: ‘side’, ‘advanced’ ,$priority // Valid: ‘default’, ‘high’, ‘low’ );

paginate_links() don’t properly work in search.php?

I’m fairly certain this is answered elsewhere, but I’ll add it here again. I believe your issue lies here: ‘current’ => max( 1, get_query_var(‘paged’) ), Try this instead: global $wp_query; $wp_query->query_vars[‘paged’] > 1 ? $current = $wp_query->query_vars[‘paged’] : $current = 1; …then: ‘current’ => $current; Your ‘base’ may also be an issue. Instead of this: … Read more

watermarking gallery items

This is what I put into a watermark.php file : <?php // loads a png, jpeg or gif image from the given file name function imagecreatefromfile($image_path) { // retrieve the type of the provided image file list($width, $height, $image_type) = getimagesize($image_path); // select the appropriate imagecreatefrom* function based on the determined // image type switch … Read more