• 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

Infinity Pro: renaming front-page-1, front-page-2, etc.

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 › General Discussion › Infinity Pro: renaming front-page-1, front-page-2, etc.

This topic is: resolved

Tagged: id selector

  • This topic has 2 replies, 2 voices, and was last updated 9 years, 2 months ago by MissKitty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • August 1, 2017 at 10:54 am #209837
    MissKitty
    Participant

    Hi StudioPressers!
    I'm using Infinity Pro, and I want to change the slug/url for the home page widgeted sections so that instead of
    http://www.myurl.com/#front-page-1
    I could use custom urls such as:
    http://www.myurl.com/#welcome

    In functions.php and front-page.php I changed 'front-page-1' to 'welcome';
    and in style-front.css I changed .front-page-1 to .welcome

    It's working EXCEPT the background image, chosen through the customizer, is not showing up.

    What am I missing?

    Thanks in advance. Below is my code.

    functions.php:

    / Register widget areas.
    genesis_register_sidebar( array(
    	'id'          => 'welcome',//'front-page-1'
    	'name'        => __( 'Welcome', 'infinity-pro' ),//'Front Page 1'
    	'description' => __( 'This is the welcome section.', 'infinity-pro' ),//This is the front page 1 section
    ) );

    front-page.php:

    <?php
    /**
     * Infinity Pro.
     *
     * This file adds the front page to the Infinity Pro Theme.
     *
     * @package Infinity
     * @author  StudioPress
     * @license GPL-2.0+
     * @link    http://my.studiopress.com/themes/infinity/
     */
    
    add_action( 'genesis_meta', 'infinity_front_page_genesis_meta' );
    /**
     * Add widget support for homepage. If no widgets active, display the default loop.
     *
     * @since 1.0.0
     */
    //replaced 'front-page-1' with 'welcome' throughout jlr 8-1-17
    function infinity_front_page_genesis_meta() {
    
    	if ( is_active_sidebar( 'welcome' ) || is_active_sidebar( 'front-page-2' ) || is_active_sidebar( 'front-page-3' ) || is_active_sidebar( 'front-page-4' ) || is_active_sidebar( 'front-page-5' ) || is_active_sidebar( 'front-page-6' ) || is_active_sidebar( 'front-page-7' ) ) {
    
    		// Enqueue scripts.
    		add_action( 'wp_enqueue_scripts', 'infinity_enqueue_front_script_styles', 1 );
    		function infinity_enqueue_front_script_styles() {
    
    			wp_enqueue_script( 'infinity-front-scripts', get_stylesheet_directory_uri() . '/js/front-page.js', array( 'jquery' ), CHILD_THEME_VERSION, true );
    
    			wp_enqueue_style( 'infinity-front-styles', get_stylesheet_directory_uri() . '/css/style-front.css' );
    
    		}
    
    		// Add front-page body class.
    		add_filter( 'body_class', 'infinity_body_class' );
    		function infinity_body_class( $classes ) {
    
    			$classes[] = 'front-page';
    
    			return $classes;
    
    		}
    
    		// Force full width content layout.
    		add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );
    
    		// Remove breadcrumbs.
    		remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
    
    		// Remove the default Genesis loop.
    		remove_action( 'genesis_loop', 'genesis_do_loop' );
    
    		// Remove site footer widgets.
    		remove_theme_support( 'genesis-footer-widgets' );
    
    		// Add front page widgets.
    		add_action( 'genesis_loop', 'infinity_front_page_widgets' );
    
    	}
    
    }
    
    // Add markup for front page widgets.
    function infinity_front_page_widgets() {
    
    	echo '<h2 class="screen-reader-text">' . __( 'Main Content', 'infinity-pro' ) . '</h2>';
    
    	genesis_widget_area( 'welcome', array(
    		'before' => '<div id="welcome" class="welcome"><div class="image-section widget-area fadeup-effect"><div class="wrap">',
    		'after'  => '</div></div></div>',
    	) );
    
    	genesis_widget_area( 'front-page-2', array(
    		'before' => '<div id="front-page-2" class="front-page-2"><div class="solid-section flexible-widgets widget-area fadeup-effect' . infinity_widget_area_class( 'front-page-2' ) . '"><div class="wrap">',
    		'after'  => '</div></div></div>',
    	) );
    
    	genesis_widget_area( 'front-page-3', array(
    		'before' => '<div id="front-page-3" class="front-page-3"><div class="image-section flexible-widgets widget-area fadeup-effect' . infinity_widget_area_class( 'front-page-3' ) . '"><div class="wrap">',
    		'after'  => '</div></div></div>',
    	) );
    
    	genesis_widget_area( 'front-page-4', array(
    		'before' => '<div id="front-page-4" class="front-page-4"><div class="solid-section flexible-widgets widget-area fadeup-effect' . infinity_widget_area_class( 'front-page-4' ) . '"><div class="wrap">',
    		'after'  => '</div></div></div>',
    	) );
    
    	genesis_widget_area( 'front-page-5', array(
    		'before' => '<div id="front-page-5" class="front-page-5"><div class="image-section flexible-widgets widget-area fadeup-effect' . infinity_widget_area_class( 'front-page-5' ) . '"><div class="wrap">',
    		'after'  => '</div></div></div>',
    	) );
    
    	// Add entry-title filter.
    	add_filter( 'genesis_featured_page_title', 'infinity_title' );
    
    	// Add team-member class.
    	add_filter( 'genesis_attr_entry', 'infinity_widget_entry_open' );
    
    	genesis_widget_area( 'front-page-6', array(
    		'before' => '<div id="front-page-6" class="front-page-6"><div class="solid-section flexible-widgets widget-area fadeup-effect' . infinity_widget_area_class( 'front-page-6' ) . '"><div class="wrap">',
    		'after'  => '</div></div></div>',
    	) );
    
    	// Remove entry-title filter.
    	add_filter( 'genesis_featured_page_title', 'infinity_title' );
    
    	// Remove team-member class.
    	remove_filter( 'genesis_attr_entry', 'infinity_widget_entry_open' );
    
    	genesis_widget_area( 'front-page-7', array(
    		'before' => '<div id="front-page-7" class="front-page-7"><div class="image-section flexible-widgets widget-area fadeup-effect' . infinity_widget_area_class( 'front-page-7' ) . '"><div class="wrap">',
    		'after'  => '</div></div></div>',
    	) );
    
    }
    
    // Modify the entry title text.
    function infinity_title( $title ) {
    
    	if ( genesis_get_custom_field( 'team_title' ) ) {
    		$title = '<span class="team-name">' . $title . '</span><span class="team-title">' . genesis_get_custom_field( 'team_title' ) . '</span>';
    	} else {
    		$title = '<span class="team-name">' . $title . '</span>';
    	}
    
    	return $title;
    
    }
    
    // Modify featred page entry classes.
    function infinity_widget_entry_open( $attributes ) {
    
    	if( is_page() ) {
    		$attributes['class'] = $attributes['class'] . ' ' . 'team-member';
    	}
    
    	return $attributes;
    
    }
    
    // Run the Genesis loop.
    genesis();
    
    http://greenhorizons.dev.onpressidium.com
    August 1, 2017 at 11:00 am #209838
    Brad Dalton
    Participant

    Change the id selector id="front-page-1" to id="welcome"

    Don't change the class selector class="front-page-1"


    Tutorials for StudioPress Themes.

    August 1, 2017 at 2:10 pm #209852
    MissKitty
    Participant

    Brad, you ROCK!
    Worked like a charm 🙂 cannot thank you enough.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ 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

© 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