Showing posts with label index.php. Show all posts
Showing posts with label index.php. Show all posts

Friday, February 10, 2012

Wordpress Loops, Index.php explained further...



  • Multiple loops
  • Theme styling
  • Get posts

Header.php broken down for Wordpress...





    header.php broken down...Notice the important HTML and PHP commands here:
    • <div id="page-wrap"> starts in your header.php file but will end in yourfooter.php file.
    • <link rel="stylesheet..."> calls on your CSS stylesheet, javascript, and profile like a normal xhtml file would
    • <div id="banner"> or <div id="header"> styles a webpage as you normally would.
    • Unique Wordpress attributes include <body <?php body_class(); ?> >which allows Wordpress to identify and tag pages using an array attribute.


    Index.php, Broken down into a Visual Guide














    A visual layout of a Wordpress page. The code for this page may be in a file calledindex.php where the following code grabs content for the webpage:

    <? php get_header(); ?>
    <? php get_template_part(); ?>
    <? php get_sidebar(); ?>
    <? php get_footer(); ?>