Can't add a php element
-
I want to add the code on this website: https://presscustomizr.com/snippet/adding-widget-area-home/
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'); }
to the functions.php file, but my website doesn’t work when I save it: “Fatal error: Call to undefined function add_filter() in /home/boredom3/public_html/wp-includes/functions.php on line 4999”.
Anyone?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Can't add a php element’ is closed to new replies.