To better understand how a Wordpress theme, it is necessary to introduce the concepts of "the loop" and template tags. The first is the cycle through which data is extracted for each post (or mailing list), and consists basically of a loop while something like this:
PHP Code:
<? Php if (have_posts ()): while (have_posts ()): the_post ();?>
/ / Output data of the post
<? Php endwhile; endif;?>
The key part of this code is represented by the function the_post() , which initializes an object PHP global $post that contains all the data on this page. Since all the functions for display and formatting of data supporting the object $post, the loop is also required to display a single post. The functions of this type are called template tags is their main task is to print formatted data. Typically, the output does not contain HTML code, since they can be used in dissimilar cases.
Bookmarks