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

Community Forums Forums Design Tips and Tricks Can I Move the Home Page (main URL) like Demo to a different page?

This topic is: resolved

This topic contains 9 replies, has 2 voices, and was last updated by  SociallyExceptional 1 year, 3 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #42100

    SociallyExceptional
    Participant
    Post count: 55

    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/
    #42102

    braddalton
    Participant
    Post count: 9732

    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.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #42407

    SociallyExceptional
    Participant
    Post count: 55

    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’ ),
    ) );

    #42409

    braddalton
    Participant
    Post count: 9732

    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


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #42698

    SociallyExceptional
    Participant
    Post count: 55

    Ok, here are the 2 codes again below:

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

    #42754

    braddalton
    Participant
    Post count: 9732

    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?


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #43011

    SociallyExceptional
    Participant
    Post count: 55

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

    #43012

    SociallyExceptional
    Participant
    Post count: 55

    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

    #43219

    SociallyExceptional
    Participant
    Post count: 55

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

    #43270

    SociallyExceptional
    Participant
    Post count: 55

    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

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.