Community Forums › Forums › Archived Forums › Design Tips and Tricks › Decor Theme and Genesis Responsive Slider
Tagged: Decor theme, genesis responsive slider
- This topic has 11 replies, 3 voices, and was last updated 9 years, 5 months ago by
nutsandbolts.
-
AuthorPosts
-
December 16, 2013 at 10:00 pm #79656
PresterJohn
MemberThe Subject pretty much says it all. Help.
How do I put Genesis Responsive Slider in the Decor Theme (you'd think they'd widgetize these things!).
Above the entire body (full width) or just next to the sidebar and above the recent posts - either is fine.
I'd go with a new theme, but this one has too many elements which my client likes.
http://palate2palette.comDecember 16, 2013 at 10:06 pm #79659nutsandbolts
MemberDecor doesn't have a home.php? If not, you could create one and include a widget area for the slider. I'm not at my computer but let me know if you need help and I'll be glad to walk you through.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+December 16, 2013 at 10:18 pm #79661PresterJohn
Membernutsandbolts - I need help. Thanks.
December 16, 2013 at 10:48 pm #79666nutsandbolts
MemberOkay, I have to run out to the grocery store but will come back in a bit with a solution for you. I just want to test it first to be sure it will look okay.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+December 16, 2013 at 11:57 pm #79680nutsandbolts
MemberAll right, this is going to involve editing two theme files and adding a new one, but I promise it's not too bad. Just be sure you have FTP or CPanel access to the site handy in case something goes wrong - when you edit functions, if you leave out a comma or semicolon, it can bring your site down. (That said, anything that gets broken can be fixed, so no worries.)
VERY important - be sure to copy these from the forum page and not from the email notification. The email strips out some of the formatting and will definitely break the site.
First, we're going to edit functions.php:
At the very bottom of the file, leave a blank line after the final function and paste this in:
/** Register widget areas */ genesis_register_sidebar( array( 'id' => 'slider', 'name' => __( 'Slider', 'decor' ), 'description' => __( 'This is the slider section.', 'decor' ), ) );
Then create a new file in the Decor folder called home.php:
Edit the file and paste in all of the following:
<?php //* Add widget support for homepage. If no widgets active, display the default loop. add_action( 'genesis_meta', 'decor_home_genesis_meta' ); function decor_home_genesis_meta() { global $paged; if( $paged < 1 ) { if ( is_active_sidebar( 'slider' ) ) { add_action( 'genesis_before_loop', 'decor_home_loop_helper', 1 ); } } } function decor_home_loop_helper() { echo '<div id="slider">'; genesis_widget_area( 'slider', array( 'before' => '<div class="slider widget-area">' ) ); echo '</div>'; } genesis();
Finally, add this to your stylesheet:
/* Slider ------------------------------------------------------------ */ #slider { padding-bottom: 7px; margin: 0 0 20px; }
You may need to tweak the CSS a little to make it work with your existing styles, but overall it turned out pretty nice on my test site. I used the Genesis Responsive Slider plugin, but since Decor isn't responsive, you could use the regular Genesis Slider plugin instead. It actually seems to be easier to deal with in my experience.
Let me know how it goes!
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+December 17, 2013 at 12:16 am #79684PresterJohn
MemberOk. Here goes.
December 17, 2013 at 12:18 am #79685PresterJohn
MemberHow do I create the home.php file? in FTP?
Sorry but I've not done it before.
December 17, 2013 at 12:26 am #79687nutsandbolts
MemberWhat FTP program are you using and who is your host? The method is different depending on what you're using and who you host with.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+December 17, 2013 at 12:26 am #79688nutsandbolts
MemberWhat FTP program are you using and who is your host? The method is different depending on what you're using and who you host with.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+December 17, 2013 at 12:32 am #79689PresterJohn
MemberOkay - it's working. Thank you so much! Whew. I mostly do the design part of things, but my coding guys isn't available for this.
And, I believe Decor IS mobile responsive - at least mine is!
October 7, 2015 at 5:03 pm #167644dmdwebdesigns
Membernutsandbolts I was curious if you could further help me with this.
I did all of the above... however because I am using a static page (not the setting for "your latest posts" as the Decor Theme uses)... my widget area is not showing up.
I went to the Static Welcome Page and tried to select the Home as the default template, but it's not in the list. What can I do to get the Slider Widget to show up while using a static page as my home page?
October 8, 2015 at 7:29 am #167668nutsandbolts
MemberIf you're using a static page, try this tutorial: https://www.nutsandboltsmedia.com/how-to-add-a-widget-area-to-a-page-using-genesis/
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+ -
AuthorPosts
- The topic ‘Decor Theme and Genesis Responsive Slider’ is closed to new replies.