• 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

Can I Move the Home Page (main URL) like Demo to a different page?

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 › Can I Move the Home Page (main URL) like Demo to a different page?

This topic is: resolved

Tagged: Executive theme

  • This topic has 9 replies, 2 voices, and was last updated 10 years ago by SociallyExceptional.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • May 21, 2013 at 5:20 pm #42100
    SociallyExceptional
    Participant

    Hello:

    We need to add an "entrance" page to our site. This would be on the main url page  http://deanamurphyglobal.com/. Then we want to have the next page (http://deanamurphyglobal.com/welcome/) be where we have our slider, then  the “home – top”, “home-middle”, “home – call to action”, all the footer widgets, etc as like the demo.

    How do we go about doing this?

     

     

    http://deanamurphyglobal.com/
    May 21, 2013 at 6:27 pm #42102
    Brad Dalton
    Participant

    You can copy the home.php file and rename it.

    If you want new widgets for the new template, you'll need to copy the code for the home page and change the i.d's for the widgets in the functions.php file.


    Tutorials for StudioPress Themes & WooCommerce.

    May 23, 2013 at 10:11 pm #42407
    SociallyExceptional
    Participant

    Ok great! I think I must be missing something still?

    I went in and renamed the copy welcome.php and loaded it up and removed the home.php

    <?php

    add_action( 'genesis_meta', 'executive_welcome_genesis_meta' );
    /**
    * Add widget support for homepage. If no widgets active, display the default loop.
    *
    */
    function executive_welcome_genesis_meta() {

    if ( is_active_sidebar( 'welcome-slider' ) || is_active_sidebar( 'welcome-top' ) || is_active_sidebar( 'welcome-cta' ) || is_active_sidebar( 'welcome-middle' ) ) {

    remove_action( 'genesis_loop', 'genesis_do_loop' );
    add_action( 'genesis_loop', 'executive_welcome_sections' );
    add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
    add_filter( 'body_class', 'executive_body_class' );
    add_action( 'genesis_after', 'executive_slider_excerpt_position' );

    /** Add body class to welcome page **/
    function executive_body_class( $classes ) {
    $classes[] = 'executive-welcome';
    return $classes;
    }

    /** Moves the slider pager if the sidebars are active and the screen is wide enough */
    function executive_slider_excerpt_position() {
    ?>
    <script type="text/javascript">
    jQuery(document).ready(function() {
    if (jQuery(".slide-excerpt").length > 0) {
    jQuery(".flex-control-nav").addClass("nav-pos-excerpt");
    }
    });
    </script>
    <?php
    }
    }
    }

     

    function executive_welcome_sections() {

    if ( is_active_sidebar( 'welcome-slider' ) || is_active_sidebar( 'welcome-top' ) || is_active_sidebar( 'welcome-cta' ) || is_active_sidebar( 'welcome-middle' ) ) {

    genesis_widget_area( 'welcome-slider', array(
    'before' => '<div class="welcome-slider widget-area">',
    ) );

    genesis_widget_area( 'welcome-top', array(
    'before' => '<div class="welcome-top widget-area">',
    ) );

    genesis_widget_area( 'welcome-cta', array(
    'before' => '<div class="welcome-cta widget-area">',
    ) );

    genesis_widget_area( 'welcome-middle', array(
    'before' => '<div class="welcome-middle widget-area">',
    ) );

    }

    }

    genesis();

    Then I went into the functions.php file and placed the page id within the widgets code.  Currently I don't have the Welcome page showing up with the changes. Thinking I didn't have the proper id within the widgets, I used "welcome" in the id area, but that didn't work either. Here is the code that is currently inside the widgets on the functions.php:

    /** Register widget areas **/
    genesis_register_sidebar( array(
    'id' => '004-slider',
    'name' => __( 'Welcome - Slider', 'executive' ),
    'description' => __( 'This is the slider section on the home page.', 'executive' ),
    ) );
    genesis_register_sidebar( array(
    'id' => '004-top',
    'name' => __( 'Welcome - Top', 'executive' ),
    'description' => __( 'This is the top section of the home page.', 'executive' ),
    ) );
    genesis_register_sidebar( array(
    'id' => '004-cta',
    'name' => __( 'Welcome - Call To Action', 'executive' ),
    'description' => __( 'This is the call to action section on the home page.', 'executive' ),
    ) );
    genesis_register_sidebar( array(
    'id' => '004-middle',
    'name' => __( 'Welcome - Middle', 'executive' ),
    'description' => __( 'This is the middle section of the home page.', 'executive' ),
    ) );

    May 23, 2013 at 11:46 pm #42409
    Brad Dalton
    Participant

    Hi

    All the apostrophes have been changed now so I cannot test this code.

    Please paste the code in Pastebin or Github Gists and link to it here. Thanks


    Tutorials for StudioPress Themes & WooCommerce.

    May 26, 2013 at 12:08 pm #42698
    SociallyExceptional
    Participant

    Ok, here are the 2 codes again below:

    https://gist.github.com/anonymous/c629ba0484caf050fb8a

    May 26, 2013 at 10:24 pm #42754
    Brad Dalton
    Participant

    That code looks alright except for the js function for the slider which is the same as the home page and will cause errors so change that.

    How about the CSS code? Are you going to use the same classes?


    Tutorials for StudioPress Themes & WooCommerce.

    May 28, 2013 at 9:12 pm #43011
    SociallyExceptional
    Participant

    Yes, I'd like to use the same classes, just to make it easier. Unless I shouldn't?

    May 28, 2013 at 9:16 pm #43012
    SociallyExceptional
    Participant

    Oh, I also just realized - I removed the home.php when I renamed and inserted the welcome.php, so technically right now there is no home, or are you referring to a function inside the newly renamed welcome.php

    May 30, 2013 at 9:58 am #43219
    SociallyExceptional
    Participant

    What specifically needs changed with the js function for the slider? This may be where I was/am confused

    May 30, 2013 at 5:12 pm #43270
    SociallyExceptional
    Participant

    Got it! Changed over the JS function so that it wasn't conflicting with the home code and was still  able to use the same classes

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 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