WordPress 3.5 Plugin Update Errors

I have a blog installed under xampp, and I am using windows 7 system. Today I updated my wordpress based blog to wordpress 3.5. There are some errors, all about wordpress plug-in. I met the following errors: Updating Plugin Akismet Downloading update from http://downloads.wordpress.org/plugin/akismet.2.5.7.zip… An error occurred while updating Akismet: Download failed. Could not open […]

2 SEO Skills on WordPress

Here let me share 2 skills on wordpress seo. The default method of a post read more is usally shows as “read more…”, or “Continue reading”. This is very bad for our seo purpose. We all know that we’d bette use our keywords as text link or at least the text link should contain our […]

How to Get URL of Current WordPress Page or Post?

We often need to know how to get url of current wordpress page or post if we re-programming wordpress. Here I will share 2 methods with you. One is via PHP code, and the other is using wordpress function. First, let me intruduce how to use PHP to achieve our demands. We can add the […]

How to WordPress Show Latest Posts under Certain Category?

Sometimes we need to modify wordpress templates to meet our demands, for example, we need to show latest posts under certain category only, say category id is 11. How to do then? Here is the code I have used for www.xuyi365.org <?php query_posts(‘showposts=5&cat=29’); while(have_posts()) : the_post(); ?> <ul> <li><a href=”<?php the_permalink() ?>” rel=”bookmark”><?php the_title(); ?></a></li> […]

Skills on How to Show different Adsense Ads at WordPress

More and more people love to use wordpress to setup blogs and place adsense ads, and many people still love the use the theme of Classic, by Dave Shea. Can we show different adsense code at the same place, but different pages then? For example, we want to show 2 adsense block at the main […]

Get WordPress Current Category URL and Link

<?php global $wp_query; $cat_obj = $wp_query->get_queried_object(); // Get the ID of a given category $category_id = get_cat_ID( ‘Category Name’ ); // Get the URL of this category $category_link = get_category_link( $category_id ); ?> <!– Print a link to this category –> <a href=”<?php echo $category_link; ?>” title=”<?php echo $cat_obj->name; ?>”><?php echo $cat_obj->name; ?></a>  

Mass Delete trash post from WordPress

Q:I want to mass delete my trash with 2000+ Posts in it. Is there a mysql command to do so? A: Please backup before running the query, i’ll not take responsibility if something goes wrong as a result.. DELETE p FROM wp_posts p LEFT OUTER JOIN wp_postmeta pm ON (p.ID = pm.post_id) WHERE post_status = […]

How to change wordpress post author?

Here is the perfect steps to change wordpress post author: 1) Login into wordpress admin area. 2) Click on Edit in the Posts section. 3) Select the posts for which you need to edit the author details. 4) From the top there is drop down for bulk actions -> select edit and apply. 5) Now, […]

Only show for en Language

Now more and more adsense accounts are banned due to useless trafice, especially non-English speaking countries trafic, we can add the following code to test our visiters Computer language: $_SERVER[‘HTTP_ACCEPT_LANGUAGE’] <?php $a = $_SERVER[‘HTTP_ACCEPT_LANGUAGE’]; echo $a; ?> We can get different results, such as en-US, en-Ca, zh-CH. We can use substr() to get certain numbers […]