Livemesh Addons for WPBakery Page Builder Shortcodes

Below, you’ll find a detailed guide on how to add the Livemesh Addons for WPBakery Page Builder Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Livemesh Addons for WPBakery Page Builder Plugin shortcodes not to show or not to work correctly.

Before starting, here is an overview of the Livemesh Addons for WPBakery Page Builder Plugin and the shortcodes it provides:

Plugin Icon
Livemesh Addons for WPBakery Page Builder

"Livemesh Addons for WPBakery Page Builder is a powerful plugin that enhances your website creation experience. It offers unique, visually engaging addons to customize your visual composer."

★★★★✩ (37) Active Installs: 20000+ Tested with: 6.3.2 PHP Version: false
Included Shortcodes:
  • [lvca_accordion]
  • [lvca_panel]
  • [lvca_pricing_item]

Livemesh Addons for WPBakery Page Builder [lvca_accordion] Shortcode

The ‘lvca_accordion’ shortcode from the addons-for-visual-composer plugin creates an accordion-style content area. It allows customization of style, toggle, and expanded settings. The output is a div element with class ‘lvca-accordion’, dynamically adjusting based on the provided attributes.

Shortcode: [lvca_accordion]

Parameters

Here is a list of all possible lvca_accordion shortcode parameters and attributes:

  • style – Determines the visual style of the accordion, default is ‘style1’
  • toggle – If true, allows multiple sections to be expanded at once
  • expanded – If true, the accordion starts off in an expanded state

Examples and Usage

Basic example – An example of how to use the ‘lvca_accordion’ shortcode with default parameters.

[lvca_accordion]

Advanced examples

Using the ‘lvca_accordion’ shortcode with a specific style, and the toggle and expanded parameters set to true.

[lvca_accordion style="style2" toggle=true expanded=true]

Using the ‘lvca_accordion’ shortcode with a different style, and the toggle and expanded parameters set to false.

[lvca_accordion style="style3" toggle=false expanded=false]

These examples demonstrate how to customize the ‘lvca_accordion’ shortcode to fit the specific needs of your website. The ‘style’ parameter allows you to choose the design of the accordion, while the ‘toggle’ and ‘expanded’ parameters control whether the accordion is collapsible and whether it starts out in an expanded state.

PHP Function Code

In case you have difficulties debugging what causing issues with [lvca_accordion] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'lvca_accordion', array( $this, 'shortcode_func' ) );

Shortcode PHP function:

function shortcode_func( $atts, $content = null, $tag = "" )
    {
        $style = $toggle = $expanded = '';
        $settings = shortcode_atts( array(
            'style'    => 'style1',
            'toggle'   => false,
            'expanded' => false,
        ), $atts );
        extract( $settings );
        $output = '<div class="lvca-accordion lvca-' . $style . '" data-toggle="' . (( $toggle ? "true" : "false" )) . '" data-expanded="' . (( $expanded ? "true" : "false" )) . '">';
        $output .= do_shortcode( $content );
        $output .= '</div><!-- .lvca-accordion -->';
        return apply_filters(
            'lvca_accordion_output',
            $output,
            $content,
            $settings
        );
    }

Code file location:

addons-for-visual-composer/addons-for-visual-composer/includes/addons/accordion/class-lvca-accordion.php

Livemesh Addons for WPBakery Page Builder [lvca_panel] Shortcode

The ‘lvca_panel’ shortcode from the addons-for-visual-composer plugin creates a panel with a title and content. This shortcode accepts parameters for ‘panel_title’ and ‘panel_id’. The title is displayed at the top of the panel, while the ID is used to uniquely identify the panel. The content within the panel is processed by the ‘do_shortcode’ function, allowing for nested shortcodes. The output is a div with the class ‘lvca-panel’, containing the title and content divs. This output can be further modified by the ‘lvca_accordion_item_output’ filter.

Shortcode: [lvca_panel]

Parameters

Here is a list of all possible lvca_panel shortcode parameters and attributes:

  • panel_title – The title that will be displayed on the panel.
  • panel_id – A unique identifier to target the specific panel.

Examples and Usage

Basic example – The basic usage of the ‘lvca_panel’ shortcode involves specifying the ‘panel_title’ parameter. This parameter defines the title of the panel.

[lvca_panel panel_title="My Panel Title" /]

Advanced examples

1. Advanced usage of ‘lvca_panel’ shortcode with ‘panel_id’ parameter. This parameter is used to assign a unique identifier to each panel. This can be useful for styling or scripting purposes.

[lvca_panel panel_title="My Panel Title" panel_id="panel1" /]

2. Using the ‘lvca_panel’ shortcode with nested content. The content enclosed within the opening and closing tags of the shortcode will be displayed within the panel. This can be used to include additional information or elements within the panel.

[lvca_panel panel_title="My Panel Title" panel_id="panel1"]Here is some additional content for the panel.[/lvca_panel]

PHP Function Code

In case you have difficulties debugging what causing issues with [lvca_panel] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'lvca_panel', array( $this, 'child_shortcode_func' ) );

Shortcode PHP function:

function child_shortcode_func( $atts, $content = null, $tag = "" )
    {
        $panel_title = $panel_id = $percentage = '';
        $settings = shortcode_atts( array(
            'panel_title' => '',
            'panel_id'    => '',
        ), $atts );
        extract( $settings );
        $panel_id = '';
        $output = '<div class="lvca-panel" id="' . $panel_id . '">';
        $output .= '<div class="lvca-panel-title">' . htmlspecialchars_decode( esc_html( $panel_title ) ) . '</div>';
        $output .= '<div class="lvca-panel-content">' . do_shortcode( $content ) . '</div>';
        $output .= '</div><!-- .lvca-panel -->';
        return apply_filters(
            'lvca_accordion_item_output',
            $output,
            $content,
            $settings
        );
    }

Code file location:

addons-for-visual-composer/addons-for-visual-composer/includes/addons/accordion/class-lvca-accordion.php

Livemesh Addons for WPBakery Page Builder [lvca_pricing_item] Shortcode

The ‘lvca_pricing_item’ shortcode from addons-for-visual-composer plugin is designed to create a pricing item section on a webpage. It accepts two parameters: ‘title’ and ‘value’. This shortcode generates a div with a class ‘lvca-pricing-item’, which contains the title and value of the pricing item. The output is sanitized to prevent security risks.

Shortcode: [lvca_pricing_item]

Parameters

Here is a list of all possible lvca_pricing_item shortcode parameters and attributes:

  • title – Defines the title of the pricing item
  • value – Sets the price or value of the pricing item

Examples and Usage

Basic example – A simple usage of the lvca_pricing_item shortcode, setting the title and value parameters.

[lvca_pricing_item title="Basic Plan" value="$9.99"/]

Advanced examples

Using the lvca_pricing_item shortcode to display a pricing item with a more complex title and value. The title includes HTML for styling, and the value includes a currency symbol and decimal point for precision.

[lvca_pricing_item title="Premium Plan" value="$19.99"/]

Another advanced usage of the lvca_pricing_item shortcode, where the title and value parameters are set with encoded HTML entities. This allows for special characters to be used in the title and value without breaking the shortcode.

[lvca_pricing_item title="&lt;span style=&#39;color: red;&#39;&gt;Ultimate Plan&lt;/span&gt;" value="&lt;strong&gt;$29.99&lt;/strong&gt;"/]

PHP Function Code

In case you have difficulties debugging what causing issues with [lvca_pricing_item] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('lvca_pricing_item', array($this, 'pricing_item_shortcode'));

Shortcode PHP function:

function pricing_item_shortcode($atts, $content = null, $tag = "") {

        $title = $value = '';

        $settings = shortcode_atts(array(
            'title' => '',
            'value' => ''

        ), $atts);

        extract($settings);

        $output = '<div class="lvca-pricing-item">';

        $output .= '<div class="lvca-title">';

        $output .= htmlspecialchars_decode(wp_kses_post($title));

        $output .= '</div>';

        $output .= '<div class="lvca-value-wrap">';

        $output .= '<div class="lvca-value">';

        $output .= htmlspecialchars_decode(wp_kses_post($value));

        $output .= '</div>';

        $output .= '</div>';

        $output .= '</div>';

        return $output;
    }

Code file location:

addons-for-visual-composer/addons-for-visual-composer/includes/addons/pricing-table/class-lvca-pricing-table.php

Conclusion

Now that you’ve learned how to embed the Livemesh Addons for WPBakery Page Builder Plugin shortcodes, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *