Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress WordPress Settings API Creating a Theme Options Page Settings How to Display a Theme Option Setting in a Template

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,252 Points

Differences in code walkthrough and video and project downloads

When did this change? Is it simply a result of an upgrade to WordPress that the project downloads had to be changed?

Is this also why Zac put the completed code in the project downloads rather than letting us follow along?

For example the code he uses in this video is

in index.php

<?php   
  $show_slideshow = get_option('wpt_slideshow');
  if($show_slideshow == true) : 
<p>Slideshow goes here</p>

<?php endif; ?>



?>

But the project downloads (which work on my version of the project) it is

<?php 
                $options = get_option( 'wpt_settings' );                
                if( isset( $options['show_slideshow'] ) && $options['show_slideshow'] == true ):
            ?>
            <p>Slideshow placeholder</p>
            <?php endif; ?>            

A common demononitator in this changes is the isset function which I'm guessing was one of the changes. :)

I just thought I'd ask as I'm thinking this is one of the earliest in the current crop of WordPress courses :)