Fixing a Problem with WordPress Trackbacks and Pingbacks

Trackbacks and pingbacks stopped working on several of my blogs. It turned out to be quite time consuming figuring out what was causing the problem. Eventually the following worked:

Installing php-xml

sudo apt-get install php-xml

And commenting out a check for empty $context variable (this doesn’t really make sense as the variable isn’t empty at this point but until it was commented out it just silently didn’t work) in the file wp-includes/class-wp-xmlrpc-server.php.

// if ( empty($context) ) // Link to target not found
// return $this->pingback_error( 17, __( 'The source URL does not contain a link to the target URL, and so cannot be used as a source.' ) );

Anyway if the initial steps you take to deal when trackbacks and pingbacks on your blog stop working you might want to try these steps that worked for me.

Related: Fix for When a WordPress Blog Stops Displaying ImagesCompare WordPress Files on Server to Proper WordPress VersionWordPress: Multiple Blog Network on One Server โ€“ Overcoming Conflicts

WordPress error: Image could not be processed. Please go back and try again.

If you get an error saying

Image could not be processed. Please go back and try again.

when you try to put a new custom header image for WordPress theme 2010 on a server using Ubuntu the following may help:

[bash]apt-get install php5-gd[/bash]
once it installs then
[code]invoke-rc.d apache2 restart[/code]

This will provide php the ability to manipulate images that WordPress is trying to use.

Using Git and Github

To download a repository hosted on github
[bash]git clone [email protected]:account_name/repo_name.git[/bash]

The [email protected]:account_name/repo_name.git will be shown on the home page for the repository on github.com

To update your code from the master branch of the repo:

[bash]git pull origin master[/bash]

To commit the changes you have made locally:

[bash]git commit -m "the message explaining what these code changes did"[/bash]

To send your changes to the repo at github:
[bash]git push origin master[/bash]

Code to Display text only on WordPress Blog Home Page

Cut and past php code to determine if it is the wordpress blog home page (and only the home page itself).

[php]<?php if (is_home() && !is_paged()): ?>[/php]

Example, to print john if it is a “homepage” templated page and jill otherwise:

[php]<?php if (is_home(); ?>

<?php
if($name == ‘john’){
echo ‘Hi John’;
}else if($name == ‘jill’){
echo ‘Hi Jill’;
}else{
echo ‘Hi’;
}
?>[/php]