Theme Wrapper in WordPress

83 %
17 %
Information about Theme Wrapper in WordPress
Technology

Published on March 1, 2014

Author: fitwp

Source: slideshare.net

Description

This presentation shows you the Idea, Technique and Application of Theme Wrapper in WordPress.

IDEA ... <head>...</head> <body> <header>...</header> HEADER <section id="content"> CONTENT SIDEBAR <?php if (have_posts()): while (have_posts()): the_post() ?> <article>...</article> <?php endwhile; endif; ?> <aside>...</aside> </section> FOOTER <footer>...</footer> COMMON PART <?php get_header(); ?> <section id="content"> <?php if (have_posts()): while (have_posts()): the_post() ?> <article>...</article> <?php endwhile; endif; ?> </section> index <?php get_sidebar(); ?> single archive OR <?php get_template_part( 'content' ); ?> <?php get_footer(); ?> DYNAMIC PART WRAPPER index.php include $file; single.php archive.php

TECHNIQUE CHECK is_home() is_single() is_archive() GET TEMPLATE FILE $file index.php FILTER template_include include single.php HOOK archive.php $file wrapper.php index.php include 'wrapper.php' include $file single.php archive.php wrapper.php include $file index.php single.php archive.php

APPLICATION CUSTOM LAYOUT HEADER CONTENT HEADER SIDEBAR SIDEBAR FOOTER HEADER CONTENT FOOTER CONTENT FOOTER CUSTOM HOOK NOTES HEADER - DRY (Don't Repeat Yourself) principle HOOK CONTENT - Change 1 file (wrapper.php), will apply changes to all template files - wrapper.php is NOT just include! SIDEBAR It's also PHP! HOOK FOOTER FREE to use conditionals, custom hooks to easily customise pages!

Add a comment

Related presentations

Related pages

Shariff Wrapper — WordPress Plugins

Der Shariff Wrapper stellt Teilen-Buttons bereit, die die Privatsphäre der Besucher schützen und im Einklang mit dem deutschen Datenschutzrecht stehen.
Read more

Theme Wrapper | Sage Documentation | Roots

The Sage theme wrapper introduces a single base file to remove any repeated markup from individual templates. Wrap up and stay DRY with the theme wrapper.
Read more

WordPress › Support » option_wrapper_theme

I see this function option_wrapper_header, option_wrapper_footer in the code of themes which provide options capabilities in their themes. I don't know ...
Read more

Shariff Wrapper — WordPress Plugins

Shariff Wrapper. Der Shariff Wrapper ... Kann ich die Shariff-Buttons in meinem Theme ... For the WordPress installation on the external server you have to ...
Read more

WordPress › Support » Tags — wrapper

Topic Posts Last Poster Freshness; Travel-eye Theme: 2: lilybeth53: 6 days: Content outside of border/wrapper - worked fine until this morning: 3: bdbrown ...
Read more

Die wichtigste Template-Datei: Index.php - Wordpress

WordPress Theme “Tutorial ... Wrapper – er enthält alle anderen Bereiche und wird zentriert auf der ... welches in WordPress “Tagline” genannt ...
Read more

Launcher Theme Demo - Premium WordPress Themes and Plugins ...

Launcher is the perfect free WordPress plugin for anyone launching a new product, website or service. Stun visitors with one of our beautiful, ready-made ...
Read more

Wrapper WordPress Theme Review

Theme testing in such detail is a tedious process. We try our very best to present the most accurate information about the theme. We need your help: if you ...
Read more

Sage | WordPress Starter Theme | Roots

The best WordPress starter theme with a modern front-end development workflow. Based on HTML5 Boilerplate, gulp, Bower, and Bootstrap.
Read more

30 kostenlose WordPress-Themes für Responsive Design | t3n

Vieles spricht daher für ein WordPress-Theme, das auch für mobile Endgeräte optimiert wurde. 30 WordPress-Themes für Responsive Design.
Read more