Community Forums › Forums › Archived Forums › Design Tips and Tricks › Infinity Pro – Copy Front Page Widget 4 Boxes to New Page
Tagged: boxes, copy code, Create Page, css, front page, new page, services, widget
- This topic has 3 replies, 3 voices, and was last updated 6 years, 5 months ago by Derek.
-
AuthorPosts
-
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.comJanuary 26, 2018 at 5:52 pm #215775DerekMemberDefinitely 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.comApril 29, 2018 at 4:11 am #219391punktorahMemberI'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 #219412DerekMemberIt 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 -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.