• 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 – Copy Front Page Widget 4 Boxes to New 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 › Infinity Pro – Copy Front Page Widget 4 Boxes to New Page

This topic is: not resolved

Tagged: boxes, copy code, Create Page, css, front page, new page, services, widget

  • This topic has 3 replies, 3 voices, and was last updated 4 years, 9 months ago by Derek.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • January 24, 2018 at 4:22 pm #215713
    [email protected]
    Member

    Hello!

    Is it possible to copy the Front Page Widget 4 boxes to a new page? I'd like to create a separate page to feature our services, but would like the boxes we use on that page to resemble the ones we will be displaying on the front page (widget 4).

    What is the most appropriate (and hopefully, easiest) way to accomplish this?

    Thanks in advance!

    http://www.pg-commercial.com
    January 26, 2018 at 5:52 pm #215775
    Derek
    Member

    Definitely doable.

    Check the documentation for creating a new page template (can find on Google). Once you have done that, add the following code to it:

    add_action( 'genesis_before_loop
', 'pg_services_widget' );
    function pg_services_widget() {
    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>',
    	) );
    }

    You may need to change the hook reference (genesis_before_loop) depending on where exactly on the page you want to place the boxes. You may also have to make some CSS adjustments, depending on how the display turns out.

    Lastly, select your new page template in the Dashboard for the page you want the boxes to show up on.


    5.12 Design Lab
    WordPress Websites built on the Genesis Framework
    512designlab.com

    April 29, 2018 at 4:11 am #219391
    punktorah
    Member

    I've tried this and it didn't work, possibly because I'm not sure if I made the new page correctly. When I made a new page, then added your code and published, all that showed up when I refreshed was a page with that code. Thoughts?

    April 29, 2018 at 2:22 pm #219412
    Derek
    Member

    It sounds like you've created a new page, not a new page template.

    You'll need to create a new PHP file (named something like page_services.php) and within that page add the following code:

    <?php
    /**
    * Template Name: Services Page Template
    * Description: Template used for the Services page
    */
    
    add_action( 'genesis_before_loop
', 'pg_services_widget' );
    function pg_services_widget() {
    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();

    Creating page templates is a bit more advanced, and will require a way to create a PHP file, and upload it to the server (as you can't do it through the WordPress Dashboard).

    There are tons of resources online if you search for "genesis create page template" on Google.


    5.12 Design Lab
    WordPress Websites built on the Genesis Framework
    512designlab.com

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 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