Frequently used codes for wordpress website development.

WordPress cms uses functions created in basic php. This makes it easier and less time consuming for a developer to create a website in wordpress. Although use of plugins made wordpress very easy to use but we always need basic codes.

Here I am going to provide a list of most frequently used wordpress codes or functions. These codes are used wether you are going to develop a simple or complex website.


1. <?php bloginfo(‘name’); ?>

Use: This function returns title of website / blog.

Example:  Suppose we use this on my website then it will return “Make money online”.


2. <?php bloginfo(‘template_url’); ?>

Use: This function returns path to the active theme.

Example: Suppose your active theme is in “active-theme” folder under domain . Then <php bloginfo(‘template_url’); ?> returns . So to represent an image path use src=”<php bloginfo(‘template_url’); ?>/images/image.jpg” where “images” is folder in current theme where required image is uploaded with name “/image”.

Note:- Click to see a list of all bloginfo function reference.


3. <?php the_permalink(); ?>

Use: This function returns the link to a post which when clicked takes you to single page view of a post.

Example: is link to this post being shown on single page. So using <a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a> will return <a href=””>Frequently used codes for wordpress website development.</a>

4. <?php the_title(); ?>

Use: This function returns title of a post.

Example: Check point 4.

 5. <?php the_post_thumbnail( array(100,100) ); ?>

Use: This function returns image saved as Featured Image in your post/page.

Example: <?php the_post_thumbnail(array( 250,250 )); ?> will return something like <img src=”” height=”250″ width=”250″ />



So above are the most commonly used WordPress functions for a beginner.


Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: