There are some important useful Scripts, Codes and hooks of WordPress that can be easily used for wordpress theme customization. Today we will be discuss on these useful WordPress’s scripts, Codes and hooks.
1) Code for Logo So that you can direct visit on homepage:
<a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a>
2) Code to call image from images directory using php:
<img border="none" class="icon" src="<?php bloginfo('template_directory'); ?>/images/image-name.png" />
3) Code to include other php files:
<?php include (TEMPLATEPATH . '/filename.php'); ?>
4) Code to Call page or post title:
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
5) Code for display content part:
<?php the_content('Read the rest of this entry »'); ?>
6) Code for show post or page date:
<?php the_time('F jS, Y') ?>
How to limit content length using Exerpts
7) Paste below code in place of content:
<?php the_excerpt(); ?>
Now paste this code in your theme functions.php file:
function new_excerpt_length($length) { return 20; } add_filter('excerpt_length', 'new_excerpt_length');
Oh my goodness! Impressive article dude! Many
thanks, However I am encountering troubles with your RSS. I don’t understand why I am unable to join it.
Is there anyone else getting the same RSS problems?
Anyone who knows the solution can you kindly respond?
Thanx!! http://Yar-net.ru/go/?url=http://alternatif188bet.com/
This excellent website really has all of the
information I wanted concerning this subject and didn’t
know who to ask. http://my-garage-plans.businesscatalyst.com/Redirect.aspx?destination=http://www.mbet88vn.com
I’ll immediately take hold of your rss as I can not to find your e-mail
subscription hyperlink or newsletter service. Do you’ve any?
Kindly permit me realize in order that I may just subscribe.
Thanks. http://shorl.com/grevetapinebra
There is a subscribe form on the bottom side of the sidebar (right side).