Duplicating and renaming the Post Caroussel module

About this forum
These forums have not been active for several years. They're available for search and reference, but a lot of this information is likely out of date.

For current information, try visiting our Knowledge Base.

Home / Support / Beaver Builder Plugin / Duplicating and renaming the Post Caroussel module

This topic is: not resolved
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #115201

    Marcel
    Participant

    Hi,

    when copying a module (with its own foldername) to a theme in the fl-builder/modules/ folder, and changing the classname and the FLBuilder::register_module entry with the new classname, the module should be visible right?

    #115301

    Jun
    Keymaster

    Hey Marcel!

    Yes, that should override the existing module as outlined in Overriding Built-In Modules.

    Jun

    #115478

    Marcel
    Participant

    One addition, to load the new module, hook it to init:

    add_action('init', 'load_custom_post_carousel_module');
    function load_custom_post_carousel_module() {
    	if ( class_exists( 'FLBuilder' ) ) {
    		require_once 'fl-builder/modules/post-carousel-nolink/post-carousel-nolink.php';
    	}
    }
    #115516

    Ben Carlo
    Keymaster

    Hey Marcel,

    Did you want to create a separate Post Carousel module? Or override the current one?

    Ben

    #115530

    Marcel
    Participant

    Ben,

    A little bit of both. Here’s what I did to create a custom Post Carousel module:

    • Copied the Post Carousel module to theme folder
    • Renamed the main php file
    • Renamed the class
    • Modified the line with register_module, to use the new classname
    • And finally added the snippet in my previous post
Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘Beaver Builder Plugin’ is closed to new topics and replies.