- This topic has 7 replies, 2 voices, and was last updated 5 years, 1 month ago by Tom.
October 27, 2016 at 7:20 am #239365Thierry
I want use a widget above the footer, on the codex i found this : https://codex.wordpress.org/Function_Reference/the_widget
on my template (functions.php) i have this :
// Set up our array of widgets $widgets = array( __( 'Right Sidebar', 'generatepress' ) => 'sidebar-1', __( 'Left Sidebar', 'generatepress' ) => 'sidebar-2', __( 'Header', 'generatepress' ) => 'header', __( 'Footer Widget 1', 'generatepress' ) => 'footer-1', __( 'Footer Widget 2', 'generatepress' ) => 'footer-2', __( 'Footer Widget 3', 'generatepress' ) => 'footer-3', __( 'Footer Widget 4', 'generatepress' ) => 'footer-4', __( 'Footer Widget 5', 'generatepress' ) => 'footer-5' );
On GP hooks, <?php the_widget(‘header’); ?> it’s not ok, what is the good code ?
ThxOctober 27, 2016 at 10:11 am #239409TomLead DeveloperLead Developer
Any reason you’re not just using the built in footer widgets?
Ideally you would register a new widget area, and then implement it in the template – that’s a little advanced though.
One thing you can try is this plugin: https://en-ca.wordpress.org/plugins/widget-shortcode/
That will allow you to add widgets into GP Hooks.October 27, 2016 at 11:06 am #239446Thierry
in fact i want a “second” footer for all website, there is un best solution ?October 27, 2016 at 1:25 pm #239474TomLead DeveloperLead DeveloperOctober 28, 2016 at 1:02 am #239575Thierry
but just for understand with GP hooks this code
<?php the_widget( 'WP_Widget_Pages' ); ?>
work, only this list https://codex.wordpress.org/Function_Reference/the_widget works ? no “gp widgets” ?October 28, 2016 at 9:11 am #239645TomLead DeveloperLead DeveloperOctober 28, 2016 at 10:04 am #239675Thierry
thank you for your answersOctober 28, 2016 at 10:44 am #239685
- You must be logged in to reply to this topic.