WordPress Category Templates

Using Page and Category templates, you can provide a different type of reader experience by defining the style with CSS and the features and functions with template tags.


The differences between the default WordPress Page template (page.php) and the template used for the Category template (category-design-portfolio.php) are explained in the table.













































Differences between the Page and Category Templates
ElementIn Page Template?In Design Portfolio Template?
Call to the Header template <?php
get_header(); ?>
YesYes
Two-column layoutYes. The <div idclass="code">="class="code">main"class="code">> styling is defined in CSS with a width:
600px.
No. The <div id=class="code">"mainclass="code">" class=class="code">"fullwidthclass="code">"> is defined in
CSS with a width of 900px.
Call to the post/page title <?php
the_title(); ?>
YesNo
Call to the post/page content <?php
the_content(); ?>
YesNo
Call to the featured image <?php
the_post_thumbnail(); ?>
NoYes
Call to the Sidebar template <?php
the_sidebar(); ?>
YesNo
Call to the Footer template <?php
the_footer(); ?>
YesYes

A lot of people still think of WordPress as simply a blogging platform where you can have and display a typical blog on your domain; however, you can see how you can have a blog and so much more on your website just with a few simple tweaks and adjustments to the templates that power your website theme.




dummies

Source:http://www.dummies.com/how-to/content/wordpress-category-templates.html

No comments:

Post a Comment