Add Wordpress Category Description

Usually wordpress category description does not show even we add each wordpress category description at WP Administration Panel. Any method to show category description? Yes! Follow me:

Go to Appearance –> Editor, and click Category Template (category.php) .

 Add <div><strong><?php single_cat_title(‘Currently browsing’); ?>
</strong>: <?php echo category_description(); ?></div> 

at proper place. Read the rest of this entry »

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 problem.  I search wordpress.org forum, and found that we have to set the folloing for our new wordpress now.

Log into WP and under Settings -> Privacy, make sure your WP isn’t blocking search engines.

At the same time,  check for a robots.txt file that is blocking bots,  get a Google account and use the Google Webmaster Tools to run a diagnostic on our site, and we will know what to do.

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, at other pages, it will not show.

 Go to wp-includes, open page-templates.php, search <span id=”more, and click the second results, at line 223, add your code within <span id=”more-’ . $id . ‘”>Put your code here></span>

 Save and upload the page to your host.

Demo: www.wordpublish.com ,this site is on cartridges, and digital cameras.

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 at size 8
largest - The largest tag (highest count) is shown at size 22
unit - Describes ‘pt’ (point) as the font-size unit for the smallest and largest values
number - Displays at most 45 tags
format - Displays the tags in flat (separated by whitespace) style
orderby - Order the tags by name
order - Sort the tags in ASCENDING fashion
exclude - Exclude no tags
include - Include all tags
link - view
taxonomy - Use post tags for basis of cloud
echo - echo the results
Parameters
smallest
(integer) The text size of the tag with the smallest count value (units given by unit parameter).
largest
(integer) The text size of the tag with the highest count value (units given by the unit parameter).
unit
(string) Unit of measure as pertains to the smallest and largest values. This can be any CSS length value, e.g. pt, px, em, %; default is pt (points).
number
(integer) The number of actual tags to display in the cloud. (Use ‘0′ to display all tags.)
format Read the rest of this entry »

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 ip plugin will 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 too.

Download:http://wordpress.org/extend/plugins/wp-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 will be showed unchanged. Read the rest of this entry »

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
list - Sets the Categories in an unordered list (<ul><li>)
optioncount - Does not display the count of posts within each Category
hide_empty - Does not display links to Categories which have no posts
use_desc_for_title - Uses the Category description as the link title
children - Shows the children (sub-Categories) of every Category listed
hierarchical - Displays the children Categories in a hierarchical order under its Category parent Read the rest of this entry »

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     ; Maximum execution time of each script, in seconds
max_input_time = 60    ; Maximum amount of time each script may spend parsing request data
memory_limit = 32M      ; Maximum amount of memory a script may consume (16MB)

3. Modify the value of “memory_limit =” ,usuall change it to 64M.

4. Reboot Apache.