before footer
-
Hi
Please help me I need to write text and add a image before the footer
I see allot of code but all of them before feature page
Is it possible to have a widget before footer?
Kind regards
-
Try this Snippet
hi
they are all within the footer area
I need the picture in
http://choiceofficefurniture.co.za/wp-content/uploads/2015/06/here.pngbut I found this code @ this snipped
http://presscustomizr.com/snippet/adding-widget-area-home/
// Adds 4 widget areas below Featured page section on Home page add_filter( 'tc_default_widgets' , 'add_featured_page_widget' ); function add_featured_page_widget( $default_widgets_area ) { $default_widgets_area ['fp_widgets'] = array( 'name' => __( 'Featured Pages Widget One' , 'customizr' ), 'description' => __( 'Below the featured pages area on home' , 'customizr' ) ); $default_widgets_area['fp_widgets_two'] = array( 'name' => __( 'Featured Pages Widget Two' , 'customizr' ), 'description' => __( 'Below the featured pages area on home' , 'customizr' ) ); $default_widgets_area['fp_widgets_three'] = array( 'name' => __( 'Featured Pages Widget Three' , 'customizr' ), 'description' => __( 'Below the featured pages area on home' , 'customizr' ) ); $default_widgets_area['fp_widgets_four'] = array( 'name' => __( 'Featured Pages Widget Four' , 'customizr' ), 'description' => __( 'Below the featured pages area on home' , 'customizr' ) ); return $default_widgets_area; } add_action('__after_fp' , 'display_my_fp_widget'); function display_my_fp_widget() { dynamic_sidebar('fp_widgets'); dynamic_sidebar('fp_widgets_two'); dynamic_sidebar('fp_widgets_three'); dynamic_sidebar('fp_widgets_four'); } // Style all the featured pages widgets so they take up the right space add_filter( 'fp_widgets_class', 'display_my_fp_widget_class'); add_filter( 'fp_widgets_two_widget_class', 'display_my_fp_widget_class'); add_filter( 'fp_widgets_three_widget_class', 'display_my_fp_widget_class'); add_filter( 'fp_widgets_four_widget_class', 'display_my_fp_widget_class'); function add_featured_page_widget_class() { return 'span3'; }so I’m sorted thanks
Great. Please mark as [resolved] in rh sidebar
oops
sorry
i already have this wiged active
add_filter( 'tc_default_widgets' , 'add_featured_page_widget' ); function add_featured_page_widget( $defaults ) { $defaults['fp_widgets'] = array( 'name' => __( 'Featured Pages Widget' , 'customizr' ), 'description' => __( 'Above the featured pages area on home' , 'customizr' ) ); return $defaults; } add_action('__before_fp' , 'display_my_fp_widget'); function display_my_fp_widget() { dynamic_sidebar('fp_widgets');so i get a php error if i use both , is there a work around for this?
Hello,
function names must be unique in the same namespace. So ..
change thisadd_featured_page_widgetand thisdisplay_my_fp_widgetto something different.
Like:add_filter( 'tc_default_widgets' , 'add_featured_page_widget_above' ); function add_featured_page_widget_above( $defaults ) { $defaults['fp_widgets_above'] = array( 'name' => __( 'Featured Pages Widget' , 'customizr' ), 'description' => __( 'Above the featured pages area on home' , 'customizr' ) ); return $defaults; } add_action('__before_fp' , 'display_my_fp_widget_above'); function display_my_fp_widget_above() { dynamic_sidebar('fp_widgets_above'); }Of course also the
fp_widgetsshould have a different name otherwise you display the same widget area twice.Wow
thanks you guys are the best , if you ever visit us at South Africa I will buy you a beer 😉
The topic ‘before footer’ is closed to new replies.
