Thursday, June 6, 2013

Introducing The Hubpages Tailor made Grounds

WordPress Custom Fields are extra information that you can add to the posts and pages. You can start off by visiting the WordPress� Using Custom Fields. This is a basic tutorial and will provide a fair idea of the subject. You will find some valuable information. But these tutorials are not detailed and do not guide you through the many uses of WordPress Custom Fields. This is one reason why people still find it difficult to use the custom fields. Though, the reality is that you can do a lot of things with WordPress Custom Fields and imagination is the key to the custom fields.

Your first question will be where to put information on the custom fields. Either on the �Write Page� or the �Write Post� in the Dashboard section of the WordPress, you will find a section at the bottom that will permit you to input a lot of custom fields. �Key� and �Value� are the two different things that you can input in the custom field. This makes your work simple indeed.

But you would be wondering, what is �Key� and �Value�. The Key refers to the name of the custom field and Value refers to the value you want to give to that name. For instance, if you are writing a movie review, you might want to add a couple of more information like the director of the movie, actors in the movie, and producer of the movie etc. you might also give a link with the help of other website and create a star rating system or other things.
Now what should you do with all this information? You can put the information on the pages, sidebars or wherever you like. If you want to show a list of movie reviews, and in alphabetical order, with the director�s name, you can make custom field that has the �Key� as �director� and �Value� as �the name of the director� for all the reviews. After doing this put this into the category of �movie reviews�. Following is the way you can create the list of each movie review. In your category ID, change the name of category=27 to �Movie Reviews� category ID.

<ul>
<?php
$movie_reviews = get_posts('category=27&numberposts=-1&orderby=post_name&order=ASC');
foreach($movie_reviews as $post) : setup_postdata($post);
?>
<li>
<a rel="nofollow" onclick="javascript:_gaq.push(['_trackPageview', '/outgoing/article_exit_link/1691906']);" href="<?php the_permalink(); ?>" title="<?php the_title(); ?& gt;"><?php the_title(); ?></a>
<?php $director = get_post_meta($post->ID, "director", $single = true);
if($director !== '')
echo 'by ' . $director;
?>
</li>
<?php endforeach; ?>
</ul>

This is a very basic way of using the WordPress custom fields, but this is a real good insight for the beginners, and it will provide them with the idea of what more they can do with custom fields. Now, log in to WordPress and see and see if this tutorial has been of a help to you! You can do a whole lot of things with the custom fields, but you will have to explore it on your own, and see what works for you!

This article was brought to you by

Wordpress SEO Themes

No comments:

Post a Comment