Community Forums › Forums › Archived Forums › Design Tips and Tricks › Swap Homepage Order in Hello Pro 2
- This topic has 2 replies, 2 voices, and was last updated 5 years, 9 months ago by jimbo5.
-
AuthorPosts
-
January 18, 2019 at 5:28 am #341918jimbo5Participant
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 #343037Victor FontModeratorMove 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 #394446jimbo5ParticipantSolved. Thank you Victor ๐ ๐ ๐
-
AuthorPosts
- The topic ‘Swap Homepage Order in Hello Pro 2’ is closed to new replies.