Community Forums › Forums › Archived Forums › Design Tips and Tricks › Add Slider to Page Agency Theme
- This topic has 26 replies, 4 voices, and was last updated 11 years, 11 months ago by moxi.
-
AuthorPosts
-
February 8, 2013 at 11:21 am #18958tavismeParticipant
How can I add a slider to a page within the Agency Theme (not front page)?
February 8, 2013 at 12:47 pm #18979Brad DaltonParticipantYou can create a widget area using a conditional tag and use the Genesis slider or you can use a slider like the easing slider which offers a shortcode.
Where exactly do you want it and on what page? Can you paste a link to the exact location please.
February 8, 2013 at 1:01 pm #18992tavismeParticipantI would like the slider on an interior page: http://frontrowcom.com/experience Which is not an option with the Agency Theme
I am not confident in complicated coding. I am still at the copy and paste stage.
If it is too complicated, I will need to look for help.
Thanks for your reply.
February 8, 2013 at 1:13 pm #19002Brad DaltonParticipantIts possible because you can create a widget anywhere there's a hook.
Or you can use the Simple Hooks plugin and add code in there with a conditional tag.
I will supply the code but where do you want it to display on the page?
Within the content area? Before the content area? In the header on that page only? After the header?
Check out this visual hook reference. http://genesistutorials.com/visual-hook-guide/
Why don't you install the Genesis Simple Hooks plugin and place some text in the exact location you want the slider to output.
February 8, 2013 at 1:21 pm #19007tavismeParticipantThank you!!
I want it to display before the content area. I will add the plugin.
I really appreciate your help.
February 8, 2013 at 1:47 pm #19022tavismeParticipantThis reply has been marked as private.February 8, 2013 at 2:12 pm #19039Brad DaltonParticipantBackup your functions.php file first and add this code:
Paste it into your child themes functions.php file http://pastebin.com/RZZAsxdQ
February 8, 2013 at 2:21 pm #19042Brad DaltonParticipantFebruary 8, 2013 at 3:53 pm #19086tavismeParticipantThank you for the code!! Does it need to go in any particular place in the functions,php file?
How will I be able to assign the featured images/pages of the slider?
February 8, 2013 at 4:13 pm #19094tavismeParticipantThis reply has been marked as private.February 8, 2013 at 9:37 pm #19157dareadelParticipantHi braddalton,
Would you be willing to share this code with me as well? This is the information I asked over a week ago but was never resolved. I wanted to place the slider before the content. You had asked if I wanted to place it before the content and I said yes at the time. Here is the link to the post: http://www.studiopress.community/topic/home-page-sidebar-for-slider-plugin/
I will appreciate your help also.
February 8, 2013 at 10:06 pm #19161Brad DaltonParticipantPaste the code at the end of your child themes functions.php file
How will I be able to assign the featured images/pages of the slider? Yes you can add the i.d's of the posts and pages to the slider settings.
Here's the code:
http://pastebin.com/u/braddalton
February 8, 2013 at 10:19 pm #19164dareadelParticipantThank you very much for your help. The site is full of other useful information and I have bookmarked it.
February 9, 2013 at 4:48 pm #19297tavismeParticipantBrad,
It worked! Very nice.
http://frontrowcom.com/our-work
The code resulted in a "BEFORE CONTENT" available widget. I added the Genesis slider widget and it duplicated the slider I have on the front page. I'll read on to see if and/or how I can add different content to the slider.
I have bookmarked your pages, very helpful information here.
Thanks again!
February 13, 2013 at 10:24 am #20081moxiMemberI am looking for more detailed info on these instructions. I want to know what the conditional tag is and where do you put it in the simple hooks.
I am wanting to put the gen slider on a page before content.
Thanks.
February 14, 2013 at 1:03 am #20245Brad DaltonParticipantFebruary 14, 2013 at 1:40 am #20255Brad DaltonParticipantFebruary 14, 2013 at 10:40 am #20326moxiMemberFebruary 14, 2013 at 10:41 am #20327moxiMemberFebruary 14, 2013 at 11:25 am #20338Brad DaltonParticipantWhere exactly according to the Genesis Visual Hook Reference? Before content full width?
Also, You need to change your permalink structure.
// Register before-content widget genesis_register_sidebar( array( 'id' => 'before-content', 'name' => __( 'WP Sites Custom Widget', 'agentpress' ), 'description' => __( 'This is the before-content section.', 'child' ), ) ); // Hook before-post widget to single page add_action( 'genesis_before_content_sidebar_wrap', 'custom_before_content', 9 ); function custom_before_content() { if ( is_page(1872) && is_active_sidebar( 'before-content' ) ) { echo '<div class="before-content"><div class="wrap">'; dynamic_sidebar( 'before-content' ); echo '</div></div>'; } } //Add widget area, full width, specific page only, before content, genesis, child themes.
This code may not work because it includes HTML within the php which can cause problems.
Go to pastebin to get the code and paste it into the end of your child themes functions.php file.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.