-
AuthorPosts
-
July 10, 2014 at 7:03 pm #289690
Hey,
i need a second Footer Area in Enfold theme. Is it possible? It should be over the main footer with the color of the Socket. How can i do that?Thanks for your help
regards
July 10, 2014 at 11:41 pm #289799Hey suchfin!
You can try to add a Color Section element but it would not work on pages with sidebar unfortunately
Regards,
YigitJuly 11, 2014 at 10:24 am #289975July 11, 2014 at 12:22 pm #290013Hey!
Thank you for using the theme.
Use this plugin to enable the use of PHP codes on the text editor: https://wordpress.org/plugins/insert-php/
Insert the dynamic_sidebar function. Refer to this link for more info: http://codex.wordpress.org/Function_Reference/dynamic_sidebar
Actually, just insert the Widget Area element to make things much more simple.
Best regards,
IsmaelSeptember 10, 2014 at 6:39 pm #316835Hey,
when I try to create a new widget area, the data of the existing widgets will be deleted. I need it for a second footer area. i don’t want to use PHP codes on the text editor. All what i want is a second footer area with 4 column’si put this code in the function.php
// Footerwidget, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'Footer-2-Links', 'enfold' ), 'id' => 'footer-2-links', 'description' => __( 'Die zweite Footer ebene links.', 'enfold' ), 'before_widget' => '<section id="%1$s" class="widget clearfix %2$s">', 'after_widget' => '<span class="seperator extralight-border"></span></section>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>', ) );
Then I created a new widget area. The problem is that the data already existing widget’s will be deleted. How can I solve the problem?
thanks and regards
rico
September 11, 2014 at 10:17 am #317247Hi!
Edit footer.php, remove everything then replace it with this: http://pastebin.com/dFC3t4m7
Edit functions.php, add this at the very bottom:
$footer_columns = avia_get_option('footer_columns','5'); for ($i = 1; $i <= $footer_columns; $i++) { register_sidebar(array( 'name' => 'Footer2 - column'.$i, 'before_widget' => '<section id="%1$s" class="widget clearfix %2$s">', 'after_widget' => '<span class="seperator extralight-border"></span></section>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>', )); }
Go to the widgets panel then add new widgets on the Footer2 columns.
Best regards,
IsmaelNovember 8, 2016 at 1:12 am #709578Hello,
I tried Ismael’s code but it breaks down the whole site, so I suppose either the code is outdated or my functions.php is already filled up with too much other stuff.
Here is the content of my functions.php
<?php /** * Theme Name child theme functions and definitions */ /*—————————————————————————————————————————*/ /* Include the parent theme style.css /*—————————————————————————————————————————*/ add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } add_theme_support('avia_template_builder_custom_css'); function add_custom_div(){ ?> <script> jQuery(".clickbar").click(function(){ window.location = jQuery(this).find("a:first").attr("href"); return false; }); </script> <?php } add_action('wp_footer', 'add_custom_div'); add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['Quicksand'] = 'Quicksand:300,400,700'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Quicksand'] = 'Quicksand:300,400,700'; return $fonts; } add_theme_support('avia_template_builder_custom_tab_toogle_id');
Any chance for help? :-)
Thank you!
November 10, 2016 at 6:44 am #710547Hi!
In the functions.php, replace the code suggested here with the following:
add_action('after_setup_theme', 'ava_register_footer_2', 10); function ava_register_footer_2() { $number = 5; for ($i = 1; $i <= $number; $i++) { register_sidebar(array( 'name' => 'Footer2 - column'.$i, 'before_widget' => '<section id="%1$s" class="widget clearfix %2$s">', 'after_widget' => '<span class="seperator extralight-border"></span></section>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>', )); } }
Replace the value of the $number variable to coincide with the number of footer columns currently activated.
And replace the whole footer.php file with the following code.
// http://pastebin.com/0ZiZaz0a
Cheers!
IsmaelNovember 30, 2016 at 1:20 am #718595Hey
Finally got to try it out and it works like a charm! Thank you Ismael!
Now I wanted to style the two footers seperatly, for the first footer row I’d like an image as a background, the other one should be customized via theme settings.
I’m using this code
#footer { background: transparent url(your-image-here) repeat top left; }
However the image streches now across both footer rows. Is there a way to seperate this? maybe give the second footer a different css id?
Thank you so much!
December 2, 2016 at 3:02 pm #719726Hi,
Add a unique class attribute to the second footer container. Look for the second occurence of this code.
<div class='container_wrap footer_color' id='footer'>
Add the class attribute.
<div class='container_wrap footer_color second_footer' id='footer'>
Use the “second_footer” class attribute.
Best regards,
IsmaelDecember 6, 2016 at 5:16 pm #721150Hey
do you mean something like this?
Hmm that creates 2 white lines between the two widget rows and the area below the socket is now colored as well.
Thank you
December 9, 2016 at 4:35 am #722299Hi,
The markup is incorrect.
<div class='container_wrap footer_color' id='footer'> <div class='container_wrap footer_color second_footer' id='footer'>
Why is it duplicated? Please remove this line.
<div class='container_wrap footer_color' id='footer'>
Best regards,
IsmaelSeptember 5, 2019 at 3:32 am #1134158I just need one new footer widget ares, above the current footer. How can I accomplish this?
September 6, 2019 at 6:36 am #1134743 -
AuthorPosts
- You must be logged in to reply to this topic.