• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Adding Slideshow To Lifestyle Home Page php

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Adding Slideshow To Lifestyle Home Page php

This topic is: resolved

Tagged: add slideshow, add slideshow to home page, adding slideshow code

  • This topic has 14 replies, 2 voices, and was last updated 13 years, 4 months ago by Jen Baumann.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • January 7, 2013 at 7:22 pm #10248
    TonySan1
    Member

    Hi all, I hope you all are doing well. My name is Tony and I am new to the forum. I am having big fun making small changes to my new Lifestyle theme. I really no nothing about coding so I am somehow stumbling through it all. I was hoping to get a little help here if possible. I would like to know if some one could instruct me or direct me to the needed information regarding how to add my slideshow .php or shortcode to my Lifestyle Theme  home page only. I have a slideshow plugin that has generated the .php code and shortcode for the slideshow all I need now is to know where to insert the code to put the slideshow on top of my home page beneeth the header and above the first post excerpt. Any help would be graetly appreciated. 🙂

    Thank You,

    TonySan1

    January 8, 2013 at 2:51 pm #10444
    Jen Baumann
    Participant

    If you edit your home.php file, which is located in the lifestyle child theme folder, the slideshow will display on the homepage only.

    Since you have a shortcode and you haven't provided the code you need to add, I'd recommend trying this (Codex):

    echo do_shortcode( '[whatever_shortcode]' );

    You'll see the function in the home.php file similar to this:

    function lifestyle_home_loop_helper() {
    	if ( is_active_sidebar( 'home' ) || is_active_sidebar( 'home-left' ) || is_active_sidebar( 'home-right' ) ) {
    		dynamic_sidebar( 'home' );
    		if ( is_active_sidebar( 'home-left' ) ) {
    			echo '<div id="homepage-left">';
    			dynamic_sidebar( 'home-left' );
    			echo '</div><!-- end #homepage-left -->';
    		}
    		if ( is_active_sidebar( 'home-right' ) ) {
    			echo '<div id="homepage-right">';
    			dynamic_sidebar( 'home-right' );
    			echo '</div><!-- end #homepage-right -->';
    		}		
    	}
    	else {
                    echo do_shortcode( '[whatever_shortcode]' );
    		genesis_standard_loop();
    	}	
    }

    If you have questions in the future, it's always easier for the community to help if you provide a url.

    January 8, 2013 at 5:32 pm #10494
    TonySan1
    Member

    Thank you Jennifer for your help. I added the code provided and I then recieved an error  message. "Parse error: syntax error, unexpected T_LNUMBER in /home/moneybiz/public_html/wp-content/themes/lifestyle/home.php on line 28"

    This is the code I inserted. is this correct, or did I miss something? "echo do_shortcode( '[slideshow_deploy id='246]' );"

    Since that is where I inserted the code I am assuming that it won't work and I need to find another solution.

    By the way you can view my site at. http://internetbusinessmastery.info

    January 8, 2013 at 5:41 pm #10498
    Jen Baumann
    Participant

    Try this. Looks like you had an extra '

    echo do_shortcode( '[slideshow_deploy id=246]' );
    January 8, 2013 at 7:23 pm #10545
    TonySan1
    Member

    Inserted the new code I don't get an error message now  but I get this text "!slideshow_deploy!" on the home page where the slideshow should go.

    January 8, 2013 at 7:41 pm #10548
    TonySan1
    Member

    Maybe this will help you help me. 🙂 Here is both the shortcode and php code for my slideshow.

    Shortcode Below

    [slideshow_deploy id='246']

    php below
    <?php do_action('slideshow_deploy', '246'); ?>

    January 10, 2013 at 12:07 pm #11006
    Jen Baumann
    Participant

    Just replace the do_shortcode with your do_action code. It doesn't appear from that you need to echo it.

    do_action('slideshow_deploy', '246');
    January 10, 2013 at 12:43 pm #11013
    TonySan1
    Member

    Hi Jen, Thank you so much for hanging in there with me. I am very grateful. That last instruction you gave me did put the slideshow on my home page only as I wanted. I only have one last request can you please tell me how to put a break or space between my slideshow and the top post title?

    Again Thank You. 🙂

    Tony

    January 11, 2013 at 12:18 pm #11284
    Jen Baumann
    Participant

    You can add this to style.css

    .slideshow_container {
      margin-bottom: 10px;
    }
    January 11, 2013 at 1:14 pm #11298
    TonySan1
    Member

    Thank you for the reply. Is there any specific place I should add this code in the style.css?

    January 11, 2013 at 1:19 pm #11301
    Jen Baumann
    Participant

    I would just add it at the bottom to make life easy 🙂

    January 11, 2013 at 1:43 pm #11306
    TonySan1
    Member

    Hi Jen, I did as you instructed and there was no change to the slideshow or space added. I really hope that I am not being a bug. If I am I apologize for it.

    January 11, 2013 at 1:46 pm #11308
    Jen Baumann
    Participant

    Make sure you clear your total cache. I do see a change. If you want to make it more drastic, increase 10px to something higher. 20px maybe?

    January 11, 2013 at 2:03 pm #11310
    TonySan1
    Member

    I do see the change now and it is just what I wanted to do. I can't than you enough for all of your help. You have made my day! 🙂

     

    Warm regards

    Tony

    January 11, 2013 at 2:30 pm #11315
    Jen Baumann
    Participant

    You're very welcome!

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Adding Slideshow To Lifestyle Home Page php’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble