• 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

Slider on Freelance Theme

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 › Slider on Freelance Theme

This topic is: resolved
  • This topic has 4 replies, 2 voices, and was last updated 12 years, 8 months ago by Brad Dalton.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • November 2, 2013 at 2:33 pm #70554
    workky
    Member

    Ok,( is_home or is_homepage, I do not have)
    Got a slider showing up on all the pages, I want it to show up on just the home page. I am not using the home page as intended. I'm using a static home page.

    I have a short code in simple hooks, the only I thing I have in there is " [layerslider id="1"]", I think this is why it shows up on all pages instead on just the home page. I don't know what to write for just home page
    included functions php

    <?php

    // Start the engine

    include_once( get_template_directory() . '/lib/init.php' );

    // Add new image sizes

    add_image_size('Homepage', 580, 275, TRUE);

    add_image_size('Rectangle', 250, 160, TRUE);

    add_image_size('Sidebar', 50, 50, TRUE);

    // Add topnav section

    add_action('genesis_before_header', 'freelance_include_topnav');

    function freelance_include_topnav() {

    require(CHILD_DIR.'/topnav.php');

    }

    // Enable HTML5 markup
    add_theme_support( 'html5' );

    /** Add support for custom header */

    add_theme_support( 'custom-header', array(

    'width' => 320,

    'height' => 110,

    'header-selector' => '#header #title-area',

    'header-text' => false

    ) );

    // Force layout on homepage

    add_filter('genesis_pre_get_option_site_layout', 'freelance_home_layout');

    function freelance_home_layout($opt) {

    if ( is_home() )

    $opt = 'content-sidebar';

    return $opt;

    }

    /** Register widget areas */

    genesis_register_sidebar(array(

    'name'=>'Home Top',

    'id' => 'home-top',

    'description' => 'This is the top section of the homepage.',

    'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'

    ));

    /** Add support for 3-column footer widgets */

    add_theme_support( 'genesis-footer-widgets', 3 );

    /** Register widget area */

    genesis_register_sidebar( array(

    'id' => 'home-slider',

    'name' => __( 'Home Slider', 'minimum' ),

    'description' => __( 'This is the home slider', 'minimum' ),

    ) );

    add_image_size( 'thumbnail', 50, 50, TRUE );

    Despite the link, im far from it, just using it as a test bed for a website im trying to convert


    life’s tough, it’s a lot tougher if you’re stupid
    My Website

    http://mariettawebdesign.org
    November 2, 2013 at 5:56 pm #70591
    Brad Dalton
    Participant
    is_front_page()

    will work for you.

    You will need to find the PHP tag which should be included in the slider docs and add it to a custom function.


    Tutorials for StudioPress Themes.

    November 2, 2013 at 7:06 pm #70614
    workky
    Member

    Thanks Brad, I'll give it a whirl


    life’s tough, it’s a lot tougher if you’re stupid
    My Website

    November 2, 2013 at 7:44 pm #70620
    workky
    Member

    Got it Brad!!!
    Thank YOU

    Once again you have bailed me out

    I ran this in simple hooks
    <?php if(is_front_page()):?>
    [layerslider id="1"]
    <?php endif;?>


    life’s tough, it’s a lot tougher if you’re stupid
    My Website

    November 2, 2013 at 9:51 pm #70638
    Brad Dalton
    Participant

    You could also hook it in from your child themes function file.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Slider on Freelance Theme’ 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