Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to get design elements on other pages?
Tagged: academy pro
- This topic has 5 replies, 3 voices, and was last updated 5 years, 8 months ago by Brad Dalton.
-
AuthorPosts
-
August 9, 2018 at 8:40 am #222338vashParticipant
I'm using the Academy Pro theme on https://fervent.eu
On the home page, right at the bottom, you'll see client testimonials. These are presented beautifully thanks to the theme's "floating module" (that's the only term I can think of).
I want to use these same "floating modules" on a landing page, for different sections of a course.
How do I pull this "floating module" to a page?
Cheers!
https://fervent.euAugust 9, 2018 at 11:56 am #222342Victor FontModeratorI'm assuming that what you are calling "floating modules" are the widget areas.
Widget areas are initialized in functions.php and displayed on the front-page template.
There are plugins that will allow you to add widget areas to standard pages. This would be the easiest way to go as long as you want to use the same content as the home page.
If you want to use widgets with different content than the home page, you have to create new widget areas, then use a plugin to display it on the right page, or create a page template for that page.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?August 9, 2018 at 11:03 pm #222358vashParticipantCheers for your reply, Victor - much appreciated.
I tried doing this by using the 'Widget Shortcode' plugin, creating a custom HTML object in the widget shortcode section (the same custom HTML that's used for the home page). When I use the shortcode on a page however, it only gets the text and not the "floating background".
Any ideas?
August 15, 2018 at 2:02 am #222493Brad DaltonParticipantYou can take the code from the front page file and add it to a template file or functions file with a hook.
add_action( 'genesis_before_footer', 'duplicate_academy_front_page_widgets' ); function duplicate_academy_front_page_widgets() { if ( is_active_sidebar( 'front-page-6' ) ) { academy_do_widget( 'front-page-6' ); } }
Change the hook genesis_before_footer to change the position of your widget output.
August 15, 2018 at 11:05 am #222526vashParticipantCheers for your response, Brad.
Will this code end up displaying exactly the same content that's on the front page, or will I be able to modify text and images for a given page?
Will it be okay for me to create a new page template using only this code?
add_action( 'genesis_before_footer', 'duplicate_academy_front_page_widgets' ); function duplicate_academy_front_page_widgets() { if ( is_active_sidebar( 'front-page-6' ) ) { academy_do_widget( 'front-page-6' ); } }
Many thanks!
Vash
August 15, 2018 at 1:59 pm #222528Brad DaltonParticipantIt will display the same content added to the front page 6 widget area.
To display unique content, you would need to register another widget area in functions.php and use a unique i.d in the code.
Example :
genesis_register_sidebar( array( 'id' => 'new', 'name' => __( 'Your Widget Area' ), ) );
And then use this code in your template or functions file with conditional tag :
add_action( 'genesis_before_footer', 'your_widget' ); function your_widget() { if ( is_active_sidebar( 'new' ) ) { academy_do_widget( 'new' ); } }
This tutorial may help explain further how to add a new widget area in Genesis child themes
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.