Skip to main content

Shortcode not showing.

Comments

11 comments

  • Permanently deleted user

    Hi Jae Tan,

    There are some plugins which are not compatible with Brizy. When placing a short code, if it does not work, it means that the plugin may not be compatible with Brizy.

    Try these things
    1. If you have added the shortcode using the Embed element, try pasting the same code with Shortcode element
    2. If you are not using one of the recommended themes, please try changing your theme to one of these and see if that helps. https://www.brizy.io/theme-partners
    3. Since the shortcode works with Gutenberg, consider developing the page using Gutenberg (while all other pages continue to be in Brizy.) You will have recreate your header, footer and menu bar etc in Guternberg for this page.

    Best regards, Nelea.

    0
  • Denis Biliato

    Hi Nelea,

    I've the same issue. I used shortcode element for insering the code, in the builder section it works but when I publish the page I see the text of code.

    Can you help me? 

    0
  • Permanently deleted user

    Hi Denis,

    Please send us the shortcode and we will check it.

    Best regards, Nelea.

    0
  • Jae Tan

    Hi Nelea,

    Would it be possible for you to share with us under what circumstances the shortcode will not work? This is so that we can take note when developing a plugin that uses shortcode to display UI.

    Best Regards,

    Jae

    0
  • Denis Biliato

    Hi Nelea, the problem was that I entered the code in a wrong file. First I copied the code in function.php file's theme and it doesn't work. After I tried to copied the code in to brizy plugin (main.php file) and it doesn't work. At the end I copied the code in to the theme plugin (index.php) and now the shortcode works well.

    Follow the code, if someone want to use it.

    /**
     *  products counter for a specific category
     */
    add_shortcode( 'products-counter', 'products_counter' );
    function products_counter( $atts ) {
        
        $atts = shortcode_atts( [
            'category' => '',
        ], $atts );
        
        $args = array(
        'post_type' => 'product',
        'posts_per_page' => -1,
        'tax_query' => array(
            array(
                'taxonomy' => 'product_cat',
                'field' => 'slug',
                'terms' => $atts['category']
            )
        ),
        'meta_query' => array(
            array(
                'key' => '_stock_status',
                'value' => 'instock'
            ),
        )
    );

    $query = new WP_Query($args);
    $inStockCount = $query->found_posts;

        if ( $query && ! is_wp_error( $query ) ) {
            return $inStockCount;
        }
        return '';
    }

    /** shortcode **/

    shortcode that you have to insert in the post or page [products-counter category="your category"]

    0
  • Permanently deleted user

    Hi Denis,

     I'm happy to hear that you already found a solution and all is working fine now. Thank you for sharing with us the solution you find. Hope it will be useful for all users who will come here and have the same question.

    Best regards, Nelea.

    0
  • Permanently deleted user

    Hi Jae Tan,

    I will open a ticket and we will check this shortcode from your dashboard.  Could you please send us the FTP credentials for these sites? I have created a private ticket for this request. You had to receive a notification regarding this by email. Could you send us in that private message the FTP credentials to them?

    Best regards, Nelea.

     

    0
  • Armand Samos

    Still a problem. Shortcode does not work no matter where I apply it.

    0
  • Armand Samos

    No it does not work with embed. Embed is for HTML code. Why would the person tell us to do this when it clearly does not work? 

    0
  • Armand Samos

    If you can tell me how to apply the shortcode via Woo, so that I can somehow recapture the widgets so I don't have to pay Woo for the same thing, I would be grateful. Thanks. 

    0
  • KC George

    Hello Armand,

    Brizy is compatible with WooCommerce shortcodes such as the ones listed below. Drag and drop the Brizy shortcode element and paste the shortcode and it will work. 

    [products limit="6" columns="3" orderby="date" class="quick-sale"]

    For a comprehensive list of Woo shortcodes, kindly visit https://woocommerce.com/document/woocommerce-shortcodes/

    0

Please sign in to leave a comment.