Livemesh Addons for Beaver Builder Shortcode

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

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

Plugin Icon
Livemesh Addons for Beaver Builder

"Livemesh Addons for Beaver Builder is a powerful plugin expanding the functionality of Beaver Builder. It provides additional custom modules and templates, enhancing your website's design and interaction."

★★★★★ (13) Active Installs: 4000+ Tested with: 6.3.2 PHP Version: false
Included Shortcodes:
  • [labb_pricing_item]

Livemesh Addons for Beaver Builder [labb_pricing_item] Shortcode

The ‘labb_pricing_item’ shortcode from the Addons-for-Beaver-Builder plugin is used to display pricing items. It extracts the ‘title’ and ‘value’ parameters from the shortcode’s attributes and outputs them within a stylized HTML structure.

Shortcode: [labb_pricing_item]

Parameters

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

  • title – The main heading of the pricing item.
  • value – The price or cost of the pricing item.

Examples and Usage

Basic example – A simple usage of the ‘labb_pricing_item’ shortcode to display a pricing item with a title and value. In this example, we have a pricing item with the title “Basic Plan” and a value of “$10 per month”.

[labb_pricing_item title="Basic Plan" value="$10 per month" /]

Advanced examples

Using the ‘labb_pricing_item’ shortcode to display a pricing item with a title and value, along with additional attributes for customization. In this example, we have a pricing item with the title “Premium Plan”, a value of “$50 per month”, and additional attributes for styling and alignment.

[labb_pricing_item title="Premium Plan" value="$50 per month" style="bold" align="center" /]

Another advanced usage of the ‘labb_pricing_item’ shortcode is to include HTML tags within the title and value attributes. This allows for further customization of the displayed content. In the following example, the title is displayed in bold and the value is displayed in a larger font size.

[labb_pricing_item title="Enterprise Plan" value="$100 per month" /]

PHP Function Code

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

Shortcode line:

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

Shortcode PHP function:

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

        $title = $value = '';

        extract(shortcode_atts(array(
            'title' => '',
            'value' => ''

        ), $atts));

        ob_start();

        ?>

        <div class="labb-pricing-item">

            <div class="labb-title">

                <?php echo htmlspecialchars_decode(wp_kses_post($title)); ?>

            </div>

            <div class="labb-value-wrap">

                <div class="labb-value">

                    <?php echo htmlspecialchars_decode(wp_kses_post($value)); ?>

                </div>

            </div>

        </div>

        <?php


        $output = ob_get_clean();

        return $output;
    }

Code file location:

addons-for-beaver-builder/addons-for-beaver-builder/includes/modules/labb-pricing-table/labb-pricing-table.php

Conclusion

Now that you’ve learned how to embed the Livemesh Addons for Beaver Builder Plugin shortcode, 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 *