Tagged: x
-
AuthorPosts
-
February 7, 2017 at 9:13 am #1361235
Daniel WParticipantHi Guys,
referring to the old https://community.theme.co/forums/topic/add-footer-widget/
I found a way to add more footer widgets.
ADD IN LINE 137 FUNCTIONS/GLOBAL/ADMIN/CUSTOMIZER/REGISTER.PHP
$list_widget_areas = array( 0 => __( 'None (Disabled)', '__x__' ), 1 => __( 'One', '__x__' ), 2 => __( 'Two', '__x__' ), 3 => __( 'Three', '__x__' ), 4 => __( 'Four', '__x__' ) );(YOU CAN ADD MORE IF YOU WANT FOR EXAMPLE ADD
$list_widget_areas = array( 0 => __( 'None (Disabled)', '__x__' ), 1 => __( 'One', '__x__' ), 2 => __( 'Two', '__x__' ), 3 => __( 'Three', '__x__' ), 4 => __( 'Four', '__x__' ), 5 => __( 'Fifth', '__x__' ), 6 => __( 'Sixth', '__x__' ), 7 => __( 'Seventh', '__x__' ) );(THE NEXT FILE YOU NEED IS FUNCTIONS/GLOBAL/ADMIN/WIDGETS.PHP / LINE 82
// // Footer. // $i = 0; while ( $i < 4 ) : $i++; register_sidebar( array( // 3 'name' => __( 'Footer ', '__x__' ) . $i, 'id' => 'footer-' . $i, 'description' => __( 'Widgetized footer area.', '__x__' ), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="h-widget">', 'after_title' => '</h4>', ) ); endwhile; }CHANGE
while ( $i < 4 ) : $i++;TO
while ( $i < x_footer_widget_areas_count() ) : $i++;The problem on this solution is, you can’t set it up in your child theme.
Does somebody know how can I fix it that it work in a child theme?Ta,
PascalFebruary 7, 2017 at 10:18 am #1361357
JadeModeratorHi Pascal,
X Theme only supports 4 columns in the Footer Widget area and adding another some more would fall out of the scope of our support as this is not a native feature.
But, I could provide you some suggestions. You can create the widget in Appearance > Sidebars so you won’t need to add it in a child theme.
Once you’ve done that, you can make use of the child theme. The file that displays the footer widgets is found in /wp-content/themes/x/framework/views/global/ named _footer-widget-areas.php.
You can copy the file and edit it’s contents in the child theme.
Hope this will get you started.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1361235 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
