Home Forums Fusion Extend Posts Carousel Elementor Widget for Custom Post Types (product)

This topic contains 1 reply, has 2 voices, and was last updated by  Joshua 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #48039

    adaldesign
    Participant

    I am trying to create a copy of the Post Carousel Elementor widget that queries the “product” custom post type instead of regular blog posts to display WooCommerce products in a Carousel.

    However the code is breaking the server… what I am doing wrong??

    https://bitbucket.org/adaldesign/acme_display_new/src/master/wp-content/themes/fusion-child/

    PS: the above code shows a VERY BASIC child theme where I am doing nothing else but what is described above.

    #48044

    Joshua
    Keymaster

    There are a couple issues:

    1. In elementor.php you’re calling fusion_is_elementor_active() which is not defined yet and it should be prepended with a backslack so it’s not namespaced to Elementor. It’s probably better to create your own function or check for Elementor being active:

    if (defined('ELEMENTOR_VERSION')) {

    2. The carousel base is also not loaded when you’re creating your widget. You can include it in your elementor-widgets.php file:

    require_once get_template_directory() . '/inc/widgets/carousel-base.php';

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.