Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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 90,845 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 :)