advertisement

Theme Wrapper in WordPress

83 %
17 %
advertisement
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.
advertisement

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

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...