Add one adsens ads except homepage.

It is very simple, copy the following code, and change YOU ADSENSE ADS CODE HERE. to your ads code. done!  <div class=”storycontent”> <?php if (($wp_query->current_post == 0)and (!is_home())) : ?> <div style=”float:right”><br> YOU ADSENSE ADS CODE HERE. </div> <?php endif; $postcnt++; ?>   <?php the_content(__(‘(more KINGPHP details…)’)); ?>  </div>

WordPress Posts not indexing on Google

We are adding regular content everyday but for the past few weeks Google don’t seem to index the new posts at all. Usually they were indexing within a few minutes.  At first I think their must be something wrong with my web hosting or SSL, so I changed the hosting from hostgator to dreamhost, same […]

Add adsense code after wordpress tag cloud

If we add <!–more–>, the content after will now show at homepage, and other categories. When visit the detailed post, the content after  <!–more–> will show.  Now  I will teach you how to add adsense code within the function, that is to say, when we visit the detailed post, the adsense ads will show also, […]

WordPress 2.8 Template Tags/wp tag cloud

Usage Default Usage ‘smallest’ => 8, ‘largest’ => 22, ‘unit’ => ‘pt’, ‘number’ => 45, ‘format’ => ‘flat’, ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘exclude’ => , ‘include’ => , ‘link’ => ‘view’, ‘taxonomy’ => ‘post_tag’, ‘echo’ => true ); ?> By default, the usage shows: smallest – The smallest tag (lowest count) is shown […]

wordpress ban ip plugin

WordPress ban ip pluginwill display a custom ban message when the banned IP, IP range, host name or referer url trys to visit you blog. You can also exclude certain IPs from being banned. There will be statistics recordered on how many times they attemp to visit your blog. It allows wildcard matching. WordPress ban […]

Plugin for limit the size of the post in the main page in WordPress

The  plugin  for WordPress in order to control the maximum amount of characters displayed for an entry on the main page. If the set limit is surpassed a link to a page with the whole content will appear and the text on the entry will be chopped to that amount of characters, otherwise the content […]

Show post titles at category, and show your own words at homepage.

<?php get_header(); ?> <?php if (is_home()) echo ” Welcome, add your own words here! “; ?> <?php if (!is_home()) { ?> <ul> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <li> <a href=”<?php echo get_permalink()?>”><?php the_title(); ?></a> </li> <?php endwhile; endif; ?> <ul> <?php }  ?> <?php get_footer(); ?>

How show wordpres categories?

Method a: wp_list_categories(). Usage  <?php wp_list_cats(‘arguments’); ?>  Examples Default Usage By default, the tag: optionall – Does not display a link to all Categories all – Text to display for link to all Categories sort_column – Sorts by Category ID sort_order – Sorts in ascending order file – Displays the Categories using the index.php template […]

Increase the memory-limit in php

When you run wordpress under xamm, Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 334230 bytes) in D:\xampp\htdocs\test.php on line814.  1. Open \xampp\apache\bin\php.ini .Do not go to the directory of phpt to find php5.ini . 2. Search”memory” and get the following: ;;;;;;;;;;;;;;;;;;; ; Resource Limits ; ;;;;;;;;;;;;;;;;;;; max_execution_time = 60     ; […]

How to add ads only at the first post?

It is very simple: <?php if ($wp_query->current_post == 0) : ?> <div style=”float:right”> ads come here. </div> <?php endif; ?> If you don’t want the ads show at homepage, using: <?php if (!is_home()) ?>