Join Carrie Dils for an in-depth discussion in this video Set up your front page to check for active widget areas, part of WordPress and Genesis: Building Child Themes from Scratch.
- We spent some high quality time with functions.php.…It's time to turn our attention to front-page.php.…So earlier in the course, we created two widget areas,…Home Welcome and Call to Action…that we specifically wanted to use on the front page.…So now our mission is to find out how to display those.…There are quite a few ways to go about this.…The more theme you study, the more you'll see variations.…But when it comes to adding widget areas to a template file…including your front page template,…you want to do two basic things.…
First, you want to see if the widget area is active.…And secondly, if it is, display it,…add a specific location on the page.…I'm going to start by creating a wrapper function.…I'll call it scratch_home_page_setup().…Then I want to check if my two widget areas,…Home Welcome and Call to Action, are being used.…There's a handy WordPress function that does just this…and it's called is_active_sidebar…and it returns a Boolean.…True if there's a widget in the widget area…and False if there's not.…
- Why build a theme from scratch?
- Creating a theme folder
- Creating the CSS and PHP files
- Adding a theme setup function
- Adding features and functionality to your child theme
- Styling the theme
- Adding content to widgets
- Making the theme responsive with media queries
Skill Level Intermediate
1. Building a Theme
2. Setting Up Your Basic Theme Structure
3. Generating Site Features and Functionality
4. Building Out Your CSS
5. Going Further with CSS
6. Putting It All Together
Prepare your theme2m 31s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.