Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #1358057

    I would like to override the newsbox widget by placing a custom version in my enfold-child folder? is it possible and how?
    Thank you.


    Hey WPStyling2020,

    Thank you for the inquiry.

    You can redeclare the whole avia_newsbox class directly in the child theme’s functions.php file or in a separate file inside the child theme directory to override the default class.


    namespace aviaFramework\widgets;
    use WP_Query;
     * Widget that creates a list of latest news entries
     * @package AviaFramework
     * @since ???
     * @since 4.9			Code was moved from class-framework-widgets.php
    if( ! defined( 'AVIA_FW' ) ) {  exit( 'No direct script access allowed' );  }
    class avia_newsbox extends \aviaFramework\widgets\base\Avia_Widget
        // the rest of the code

    Best regards,


    Hi Ismael, thank you for your reply.
    I’ve tried to include that code in my child-theme functions.php but I get a fatal error:

    Fatal error: Uncaught Error: Class “aviaFramework\widgets\base\Avia_Widget” not found in website.com\wp-content\themes\enfold-child\functions.php:21

    Line 21: class avia_newsbox extends \aviaFramework\widgets\base\Avia_Widget



    Sorry for the delay. Please try to add the following code in the functions.php file, then look for the Custom Latest News widget in the Appearance > Widgets panel.

    // https://pastebin.com/16fbz8Hq

    Best regards,

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.