WordPress.org

Forums

evolve
Fatal errors with registering widgets (1 post)

  1. Steph Wells
    Member
    Posted 1 year ago #

    Please fix your theme. This is causing big issues with other plugins that are doing things correctly.

    Change this:

    function evolve_carousel_init() {
    
    	register_widget('evolve_carousel_WP_Widget');
    
    	do_action('widgets_init');
    }
    
    add_action('init', 'evolve_carousel_init', 1);

    to this:

    function evolve_carousel_init() {
    
    	register_widget('evolve_carousel_WP_Widget');
    }
    
    add_action('widgets_init', 'evolve_carousel_init', 1);

    Please do not trigger a WordPress action like this. Init actions SHOULD NOT be triggered again. Here's more info on how to do this correctly.
    https://codex.wordpress.org/Widgets_API

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic