More from: wordpress

Ongoing hacking attacks on WordPress

This just in via WordFence email:  Wordfence <>

AJAX call creates a user named wpservices with the email and the password w0rdpr3ss. With this user in place, the attacker is free to install further backdoors or perform other malicious activity.

Block these IPs in cPanel / IP Blocker: – Hosts the script responsible for rogue administrator creation. Also associated with other malvertising scripts in earlier incarnations of this campaign. – Hosts ad network scripts for redirection and popups.

IP Addresses

Details please review their article at

WordPress “All in One SEO” Facebook problem

Apparently due to recent changes, WordPress blogs with All in One SEO will not automatically post to FaceBook. After some web searching and multiple test messages, the root cause seems to be the All in One SEO plugin not writing “og” tags right for FaceBook, so FaceBook refuses to post. Posting to FaceBook by clicking the Share button under the post works normally.

I am not sure how to fix this in All in One SEO, although my understanding is that this is a configuration error on my part. However, for now, disabling the All in One SEO plugin fixes the problem and scheduled posts are not automatically shared on FaceBook. The problem affected only sharing on FaceBook: sharing to twitter, G+, and LinkedIn continued to work fine.

WordPress Navigation Problem

xAnyone have an idea why this happens, or how to fix it?

Theme in use is a child of XRAY v1.4.3 in WordPress 4.1. The only new file is a copy of category.php which has been edited to make only one pass for The Loop then show the previous_post_link(). The modified code is shown at the bottom of this article.

In the WordPress Codex Function Reference for previous_post_link() it says that previous_post_link() is called to provide a link to the prior post (chronologically). It says that the search can be limited to only posts in the same category as the present post by specifying TRUE for $in_same_term and the part of the taxonomy to keep the same in $taxonomy, which defaults to ‘category’.

<?php previous_post_link( $format, $link, $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ); ?>

In other words, if you are searching for posts in the category “The Great Pudding Explosion”, and after it presents the first post (the most chronologically recent post), then the link returned by

<?php previous_post_link( '&laquo;-- %link',' Prior ',TRUE); ?>

will be restricted to the same category as the first post returned, and be the next most recent post — the post chronologically immediately before the post being displayed and in the same category.

I do not see how what I have is different from what is shown as the example in the Codex:

Text As Link, Without Post Title, Within Same Category[edit]

Displays custom text as link to the previous post within the same category as the current post. Post title is not included here. “Previous in category” is the custom text, which can be changed to fit your requirements.

 <?php previous_post_link('%link', 'Previous in category', TRUE); ?> 

This is all fine in theory but it does not seem to work because it is loosing the proper URL and subsequent posts are no longer restricted to the category “The Great Pudding Explosion”.

If I ask for a post from the archive it properly fetches the most recent post with the requested category: the URL of the page is

where category “tgpe” is under the parent category “story”. Clicking previous_post_link() does go to the previous post, however the new URL is

Notice that WordPress is no longer caring about category. Clicking the result of previous_post_link() again displays the next most recent post, from any category, considering date only, not restricted to the original category.

The relevant code in category.php in the xray child folder is:

<?php get_header(); ?>

<!-- Main Content -->
<div class="container" id="main-container">
 <div class="row">

 <?php get_exray_primary_sidebar(); ?>

 <?php get_exray_content_html_opening(); ?>
 <?php Exray::load_breadcrumb(); ?>

 <div class="content" role="main">

 <?php if(have_posts()) : ?>

 <div class="top-content" style="">
 <h5><?php single_cat_title( __('More from: ', 'exray-framework'), true ); ?></h5>

 <hr class="content-separator">


 <?php the_post(); ?>
 <?php get_template_part( 'content', get_post_format() ); ?>
 <?php else : ?>
 <h1><?php _e("No post were Found", "exray-framework") ?></h1>
 <?php endif; ?>

 <p><?php previous_post_link( '<span style="font-size:120%;font-weight:bold ;">&laquo;-- %link</span>',' Prior ',TRUE); ?> | <?php next_post_link( '<span style="font-size:120%;font-weight:bold;">%link --&raquo;</span>',' Next ',TRUE); ?></p>

 <!-- End nav-below --> 
 <!-- end content -->
 <!-- end span6 main --> 
 <div id="primary" class="widget-area span3 main-sidebar" role="complementary">

 <?php get_sidebar('sidebar'); ?>

 <!-- end span3 primary left-sidebar --> 

 <?php get_exray_secondary_sidebar(); ?> 
 <!--End row -->
<!-- End Container -->
<!-- End Main Content -->

<?php get_footer(); ?>

Tracking it down, here is the problem.
The call to previous_post_link() eventually calls get_adjacent_post() in /wp-includes/link-template.php.
Going into function get_adjacent_post() the $taxonomy has the correct value, ‘category’, HOWEVER it calls get_adjacent_post_link() to find the next/prior post;
The URL returned does not include the necessary….. but looses that /category/ part that is needed in the URL for it to continue to work.

x The get_adjacent_post_link() code (debugging comments added):

 /** This filter is documented in wp-includes/post-template.php */
 $title = apply_filters( 'the_title', $title, $post->ID );
 $date = mysql2date( get_option( 'date_format' ), $post->post_date );
 $rel = $previous ? 'prev' : 'next';
 $string = '<a href="' . get_permalink( $post ) . '" rel="'.$rel.'">';

echo "\n<!--\n inside function get_adjacent_post_link line ".__LINE__."\n\$string='$string'\n-->\n";

 $inlink = str_replace( '%title', $title, $link );
 $inlink = str_replace( '%date', $date, $inlink );
 $inlink = $string . $inlink . '</a>';

echo "\n<!--\n inside function get_adjacent_post_link line ".__LINE__."\n\$inlink='$inlink'\n-->\n";

 $output = str_replace( '%link', $inlink, $format );
echo "\n<!--\n inside function get_adjacent_post_link line ".__LINE__."\n\$output='$output'\n-->\n";

Produces html code:

 inside function get_adjacent_post line 1569
 $query='SELECT p.ID FROM wp_posts AS p INNER JOIN wp_term_relationships AS tr ON p.ID = tr.object_id INNER JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE p.post_date < '2012-01-09 06:57:40' AND p.post_type = 'post' AND p.post_status = 'publish' AND tt.taxonomy = 'category' AND tt.term_id IN (87) ORDER BY p.post_date DESC LIMIT 1'
 inside function get_adjacent_post_link line 1859
 $string='<a href="" rel="prev">'
 inside function get_adjacent_post_link line 1865
 $inlink='<a href="" rel="prev"> Prior </a>'
 inside function get_adjacent_post_link line 1868
 $output='<span style="font-size:120%;font-weight:bold;">&laquo;-- <a href="" rel="prev"> Prior </a></span>'
 <span style="font-size:120%;font-weight:bold;">&laquo;-- <a href="" rel="prev"> Prior </a></span> |

So after clicking the link to go to the previous post in the same category, the result to make the link the next time looks like

 inside function get_adjacent_post
 inside function get_adjacent_post line 1525
 inside function get_adjacent_post line 1569
 $query='SELECT p.ID FROM wp_posts AS p WHERE p.post_date < '2011-12-18 15:02:24' AND p.post_type = 'post' AND p.post_status = 'publish' ORDER BY p.post_date DESC LIMIT 1'
 <link rel='prev' title='Love' href='' />
Which of course is wrong. The post with the slug "love" is not even in the category "The Great Pudding Explosion"

WordPress Chosen for Microsoft Blog Space

Microsoft has chosen to migrate their existing Live Spaces blogging functionality to to provide more features for their customers. We feel that this confirms our commitment to support WordPress in the business environment.

From a Windows Live Newsletter we received 10/23:

Windows Live Newsletter
Dear Windows Live Spaces customer,

We are very excited to announce our collaboration with a premier and innovative blogging service,, to offer you an upgraded blogging experience. We’ll help you migrate your current Windows Live Spaces blog to or you can download it to save for later. On March 16th, 2011 your current space will close.

With the new release of Windows Live services, we’ve made a series of changes and improvements across our products. We chose to partner to provide our users with a fantastic blogging solution. However, we realize the changes will have an impact on you – this email aims to address any concerns you may have.

Why is this happening?

Our customers have asked for richer blog functionality including an integrated statistics system, continuous saving of drafts and improvements to spam-fighting technology. To deliver the best possible blogging experience, we are collaborating with to provide their free service to you. For those of you that already have a blog on Windows Live Spaces, we will make it easier for you to get started while helping you move what you’ve already built up on Spaces.

If you are on Microsoft Live Spaces, simply follow the directions in the email you also should have received. If you are not on Live Spaces but would like to begin benefiting from the functionality of WordPress then you can sign up on