• 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

Swap Homepage Order in Hello Pro 2

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 › Swap Homepage Order in Hello Pro 2

This topic is: resolved

Tagged: frontpage, Hello Pro, homepage, order, swap

  • This topic has 2 replies, 2 voices, and was last updated 4 years, 2 months ago by jimbo5.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • January 18, 2019 at 5:28 am #341918
    jimbo5
    Participant

    Hi,

    I want to put the Home-Call To Action widget section of the Homepage above the Home - Portfolio section in the Hello Pro theme (the new one).

    I know that I have to change the front-page.php archive but Iยดm not sure in with lines.

    The front-page.php is like this:

    `<?php
    /**
    * This file adds the Home Page to the Hello Theme.
    *
    * @author brandiD
    * @package Hello
    * @subpackage Customizations
    */

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

    if ( is_active_sidebar( 'home-welcome' ) || is_active_sidebar( 'home-intro' ) || is_active_sidebar( 'home-cta' ) || is_active_sidebar( 'home-features' ) || is_active_sidebar( 'home-statement' ) || is_active_sidebar( 'home-portfolio' ) || is_active_sidebar( 'home-testimonial' ) ) {

    // Set full-width layout
    add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );

    // Custom Loop
    remove_action( 'genesis_loop', 'genesis_do_loop' );
    add_action( 'genesis_loop', 'hello_pro_home_sections' );

    // Add custom body class
    add_filter( 'body_class', 'hello_pro_add_home_body_class' );

    }

    }

    function hello_pro_home_sections() {

    $section1img = get_theme_mod( '1-hellopro-image', '' );
    $section1Class = '';

    $section2img = get_theme_mod( '2-hellopro-image', '' );
    $section2Class = '';

    $section3img = get_theme_mod( '3-hellopro-image', '' );
    $section3Class = '';

    $section4img = get_theme_mod( '4-hellopro-image', '' );
    $section4Class = '';

    $hasImageClass = 'has-image';

    if ( $section1img !== '' ) {
    $section1Class = $hasImageClass;
    }
    if ( $section2img !== '' ) {
    $section2Class = $hasImageClass;
    }
    if ( $section3img !== '' ) {
    $section3Class = $hasImageClass;
    }
    if ( $section4img !== '' ) {
    $section4Class = $hasImageClass;
    }

    // Hero Image/Welcome
    if ( is_active_sidebar( 'home-welcome' ) ) {
    genesis_widget_area( 'home-welcome', array(
    'before' => '<div class="top home-welcome-container '.$section1Class.' "><div class="wrap"><div class="home-welcome widget-area">',
    'after' => '</div></div></div>',
    ) );
    }

    // Intro
    if ( is_active_sidebar( 'home-intro' ) ) {
    genesis_widget_area( 'home-intro', array(
    'before' => '<div class="home-intro widget-area"><div class="wrap">',
    'after' => '</div></div>',
    ) );
    }

    // CTA
    if ( is_active_sidebar( 'home-cta' ) ) {
    genesis_widget_area( 'home-cta', array(
    'before' => '<div class="home-cta widget-area '.$section2Class.' "><div class="wrap">',
    'after' => '</div></div>',
    ) );
    }

    // Features
    if ( is_active_sidebar( 'home-features' ) ) {
    genesis_widget_area( 'home-features', array(
    'before' => '<div class="home-features widget-area"><div class="wrap">',
    'after' => '</div></div>',
    ) );
    }

    // Headline
    if ( is_active_sidebar( 'home-statement' ) ) {
    genesis_widget_area( 'home-statement', array(
    'before' => '<div class="home-statement widget-area '.$section3Class.' "><div class="wrap">',
    'after' => '</div></div>',
    ) );
    }

    // Portfolio
    if ( is_active_sidebar( 'home-portfolio' ) ) {
    genesis_widget_area( 'home-portfolio', array(
    'before' => '<div class="home-portfolio widget-area"><div class="wrap">',
    'after' => '</div></div>',
    ) );
    }

    // Testimonial
    if ( is_active_sidebar( 'home-testimonial' ) ) {
    genesis_widget_area( 'home-testimonial', array(
    'before' => '<div class="home-testimonial widget-area '.$section4Class.' "><div class="wrap">',
    'after' => '</div></div>',
    ) );
    }

    }

    // * Add body class to home page
    function hello_pro_add_home_body_class( $classes ) {

    $classes[] = 'hello-pro-home';
    return $classes;

    }

    genesis();

    January 18, 2019 at 7:12 am #343037
    Victor Font
    Moderator

    Move the CTA code below the headline code. The code blocks start with their comments, i.e. //CTA.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    January 21, 2019 at 4:16 am #394446
    jimbo5
    Participant

    Solved. Thank you Victor ๐Ÿ™‚ ๐Ÿ™‚ ๐Ÿ™‚

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Swap Homepage Order in Hello Pro 2’ 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

© 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