Okay
  Public Ticket #3426119
Nectar Slider not working with shortcode
Closed

Comments

  • nickelaos started the conversation

    I have a problem with Nectar Slider on my site: https://www.vastu.co.il/

    I cannot display it via shortcode at all. Here is my shortcode:

    [nectar_slider flexible_slider_height="false" loop="true" location="product-category-slider" bullet_navigation_style="see_through" slider_transition="fade" slider_button_styling="btn_with_count" button_sizing="regular" slider_height="450"]

    All I see is a black section which is a loading box in fact.

    Interesting thing: the slider is displayed on the Home page via page builder. It looks fine. But I need to display it in product categories as well (there is no page builder). That's why I need to use a shortcode.

    I've already tried the following steps already:

    - checked for errors in the browser console
    - inspected slider HTML/CSS
    - disabled ALL plugins to see if there are some conflicts
    - updated WP & plugins to the latest version

    Salient version: 15.0.8

    It is rather critical and urgent for me. Please, give me some tips or tell me how to solve it.

  •  1,077
    ThemeNectar replied

    Hey nickelaos,

    You'll need to manually enqueue the Nectar Slider script/stylesheet via your child theme in order to have them loaded when manually calling that shortcode outside of the main content area. Here's an example snippet you can paste into your child functions to handle that:

    add_action( 'wp_enqueue_scripts', 'salient_child_load_nectar_slider', 100);
    function salient_child_load_nectar_slider() {
        wp_enqueue_style( 'nectar-slider' );
        wp_enqueue_script( 'nectar-slider' );
    }
    

    Kind regards

  • nickelaos replied

    Still not working. Do you have other suggestions?

  •  1,077
    ThemeNectar replied

    Hey nickelaos,

    It does not appear that the snippet provided is active within the setup when taking a look at the loaded assets on the front-end. Could you kindly provide temporary admin access so that we can take a closer look at the backend?

    Thanks in advance

  •   worldshopISR replied privately
  •   ThemeNectar replied privately
  • nickelaos replied

    Did you manage to sign in?

  •  1,077
    ThemeNectar replied

    Hey Nick, the snippet does appear to be added in correctly, and I can see that the Nectar Slider assets are loading globally now. Can you provide a direct URL to one of your categories where you've added the shortcode and it's not working?

  • nickelaos replied

    I removed it because it is not working. Please, insert the shortcode in archive-product.php (line 58).

    You can check the result on the following page:

    https://www.vastu.co.il/product-category/%D7%A9%D7%95%D7%9C%D7%97%D7%A0%D7%95%D7%AA-he-he/

  •  1,077
    ThemeNectar replied

    Hey, It looks like the only issue remaining with your implementation was that you had entered the slug for the location instead of the real name i.e. you needed location="Product Category Slider" instead of location="product-category-slider". With that change, it's now displaying.

    Kind regards

  • nickelaos replied

    Great, thanks a lot! You really helped me. You can close the ticket.