Unneeded Meta tags in WordPress

Sometimes in your theme unneeded meta tags show up. They look like

<meta content="noindex,follow" name="robots"/>

or something like this.
I have seen three reasons for this:

  • Plugin settings. In this case check your plugins, uncheck what's needed. Main plugin candidates: All in One SEO Pack, other seo plugins.
  • Blog Privacy atributes. In this case go to Settings -> Privacy and check

I would like my blog to be visible to everyone, including search engines (like Google, Sphere, Technorati) and archivers

  • Hard coded values in theme files.¬† In this case go to Appearance -> Editor and delete such meta tags from theme files.

WordPress blank screen error solution

Stumbled upon an error: WordPress admin pages just went blank. No error reports, nothing. Discovered two possible reasons for it:

  • corrupted WordPress files.
  • White space after last entry in wp-config.php file.

Solutions:

If files are corrupted (incomplete uploads, for example): just use good ftp client, upload again. If curious: I use FireFTP for Firefox addon.

Take notice that files can be corrupted by malicious code too. In that case, change your passwords before uploading new versions of files.

If it doesn't help: check your wp-config.php file. Notepad++ is good for that. If you see white-space and / or endline characters at the end of your file, delete them.

WordPress and SimplePie functionality

SimplePie functionality for your blog:
function fetch_feed_modified($url) {
 require_once  (ABSPATH . WPINC . '/class-feed.php');
 $feed = new SimplePie();
 $feed->set_feed_url($url);
 $feed->set_cache_class('WP_Feed_Cache');
 $feed->set_file_class('WP_SimplePie_File');
 $feed->set_cache_duration(apply_filters('wp_feed_cache_transient_lifetime', 43200));
 $feed->init();
 $feed->handle_content_type();

 if ( $feed->error() )
 printf ('There was an error while connecting to Feed server, please, try again!');

 foreach ($feed->get_items() as $item){
  printf('<li><a href="%s">%s</a>',$item->get_permalink(), $item->get_title());
 printf(' <small>%s</small></li>',$item->get_date());
 }
}

function ms_smallpie_feed($uri) {
 if(function_exists('fetch_feed_modified')) {
 fetch_feed_modified($uri);
 }
}

Continue reading WordPress and SimplePie functionality

Co-authors author list bug

There is a bug inside Co Authors and Co Authors Plus plugin, coauthors_wp_list_authors function, where co authors without their own posts doesn't get links to their posts: http://wordpress.org/support/topic/275644

The bug is inside this sql statement:

$author_count = array();
 $sql = "SELECT DISTINCT
 p1.post_author,
 (COUNT(ID)+(SELECT COUNT(*)
 FROM $wpdb->posts p2, $wpdb->postmeta pm
 WHERE p2.ID = pm.post_id
 AND pm.meta_key = '_coauthor'
 AND pm.meta_value = p1.post_author)
 ) AS count
 FROM $wpdb->posts p1
 WHERE post_type = 'post' AND " . get_private_posts_cap_sql( 'post' ) . "
 GROUP BY post_author";

Continue reading Co-authors author list bug