Put some shine in your back-end

Christine Rondeau

@bluelimemedia
Bluelime Media

WordPress

It's easy to use

Let's keep it that way

Custom Page Layout Options

  • Column Shortcode
  • Widgets
  • Include Page
  • Loop through child pages
  • Custom Fields
Page Admin
TwentyTwelve Defaultpage
Debut Default Page

Columns

Sample Page With Columns WordPress SandBox

Shortcodes to the rescue

Plugins are great for this and I recommend:

or you can create your own shortcode

[column-group]
	[column]This is my first column[/column]
	[column]This is my second column[/column]
[/column-group]

Pro

  • Plugins and plenty and easy to implement
  • You can add them to any page

Con

  • Shortcodes are not intuitive for everyone
  • You can end up with layout problems
Wearelse

Widgets

Widgets and easy to use


  register_sidebar( array(
	'name' => __( 'First Home Page Column', 'blm' ),
	'id' => 'first-footer-widget-area',
	'description' => __( 'The first homepage column', 'blm' ),
	'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ' ) );

    Widgets

    Easy to insert in templates

    
    	sidebar-{slug}.php
    
    	<?php get_sidebar( 'slug' ); ?>
    
    
    You can have as many of these as you want.
    Sample Page With Widgets

    Pro

    Con

    • Widgets are located in the appearance section
    • Too many widgets can be messy
    • What if you want to add more later?

    Include Pages

    Child Pages
    
    <?php 
    	$new_query_1 = new WP_Query();
    	$new_query_1->query( array( 'page_id' => 2 ) );
    	while ( $new_query_1->have_posts()) : $new_query_1->the_post();
    		the_content();
    	endwhile;
    wp_reset_query(); ?>
    
    

    Pro

    • All content changes are within the page section
    • Assigning page children gives you a great visual hierarchy

    Con

    • What if pages are deleted?
    • What if you want to add more later?

    Child Page Loops

    Accordion1
    Accordion2
    <?php 
      $childpages = new WP_Query( array(
        'post_type'      => 'work', 
        'post_parent'    => $this_page,
        'posts_per_page' => 100,
        'orderby'        => 'menu_order'
        )); 
        while ( $childpages->have_posts() ) : $childpages->the_post(); ?>
    
        <section>
        <h2 class="title"><a href="#"><?php the_title(); ?></a>
          <div class="content">
            <?php the_content();?>
              <?php //Other loop goes here... ?>
          </div>
        </section>
    <?php endwhile; wp_reset_query(); ?>
    

    https://gist.github.com/crondeau/6201178

    Twitter

    Pro

    • You can have as many children as you need
    • It's a great option when there's lots of content

    Con

    • You need to know your loops

    Custom Fields

    Native Custom Fields need to be visible

    Custom Fields

    Native Custom Fields are ... meh

    Custom Field Editor

    Advanced Custom Fields ROCK!

    ACF

    advancedcustomfields.com

    Select the field type you wish to use

    Field Type

    Add Multiple fields per metabox

    ACF2

    Display the metabox only where needed

    ACF Rules

    Easy to use

    Team Info
    Jmills
    Acf Columns

    PRO

    AMAZEBALLS!!!!!!!!!!

    CONS

    • It's not always the right solution

    Puzzles need elegant solution

    Thank You


    Photo Credits: Andreas Levers, Peter Whiddon, Horia Varlan, Jon Wilson, James Raynard, Brad Montgomery