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()) ?>

How to let tag cloud show the same size font and in list style?

It is very easy to tag cloud show the same size font and in list style, there are 2 ways to do this: 1. Change sidebar.php in templates: <li> <h2>Tag Cloud</h2> <?php wp_tag_cloud(‘smallest=8&largest=8&number=45&orderby=name&format=list’); ?> <!– wp_tag_cloud(‘smallest=8&largest=8&number=45&orderby=name&format=list’)–> </li> another way is change code in widgets.php inside include document: function wp_widget_tag_cloud($args) { extract($args); $options = get_option(‘widget_tag_cloud’); $title […]

How to let the post show from lowest to highest?

If you want your posts show from lowest to highest, it is very simple, just add: <!–p query_posts($query_string.’&order=ASC’);–> for example, the following code will let all your post show from lowest to highest: <!–p query_posts($query_string.’&order=ASC’);–> <!–p if (have_posts()) : while (have_posts()) : the_post();–>