Flipbox Builder Shortcode

Below, you’ll find a detailed guide on how to add the Flipbox 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 Flipbox Builder Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the Flipbox Builder Plugin and the shortcodes it provides:

Plugin Icon
Flipbox Builder

"Flipbox Builder is a dynamic WordPress plugin designed to create interactive flipbox elements. It provides user-friendly tools for unique design customization, enhancing your site's aesthetics."

✩✩✩✩✩ () Active Installs: 2000+ Tested with: 6.2.3 PHP Version: false
Included Shortcodes:
  • [Flipbox]

Flipbox Builder [Flipbox] Shortcode

The Flipbox Builder shortcode creates a dynamic flipbox on your WordPress site. It fetches data from the ‘fb’ post type, sorts it in ascending order, and applies the Flipbox Builder settings to each post. This code allows customization of the flipbox appearance, including color, font, alignment, and more. It provides a visually engaging way to display content on your website.

Shortcode: [Flipbox]

Parameters

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

  • id – Unique identifier for the specific flipbox design

Examples and Usage

Basic example – Displaying a specific flipbox by referencing its ID.

[Flipbox id=1 /]

Advanced examples

Displaying multiple flipboxes by referencing their IDs. This will display the flipboxes with IDs 1, 2, and 3.

[Flipbox id=1,2,3 /]

Displaying a specific flipbox and customizing its appearance by referencing its ID and adding additional parameters. This will display the flipbox with ID 1 and set the flip type to “vertical”, items per row to “2”, and link open to “_blank”.

[Flipbox id=1 flip_fliptype="vertical" flip_itemperrow="2" flip_linkopen="_blank" /]

PHP Function Code

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

Shortcode line:

add_shortcode('Flipbox', 'flipbox_builder_Flipbox_ShortCode');

Shortcode PHP function:

function flipbox_builder_Flipbox_ShortCode($Id)
{
    ob_start();
    if (!isset($Id['id']))
    {
        $flipbox_ID = "";
    }
    else
    {
        $flipbox_ID = $Id['id'];
    }
?>	

	<?php
    $args = array(
        'post_type' => 'fb',
        'p' => $flipbox_ID,
        'orderby' => 'ASC'
    );
    $wp_query = new WP_Query($args);
    query_posts($wp_query);
    while ($wp_query->have_posts()):
        $wp_query->the_post();
        $PostId = get_the_ID();
        $All_data = unserialize(get_post_meta($PostId, 'flipbox_builder_Flipbox_data', true));
        $TotalCount = get_post_meta($PostId, 'flipbox_builder_Flipbox_count', true);
        $Flipbox_Settings = unserialize(get_post_meta($PostId, 'flipbox_builder_Flipbox_Settings', true));
        $Default_Settings = unserialize(get_option('flipbox_builder_Flipbox_default_Settings'));
        $option_names1 = array(
            "flip_fliptype" => $Default_Settings["flip_fliptype"],
            "flip_itemperrow" => $Default_Settings["flip_itemperrow"],
			"flip_linkopen" => $Default_Settings["flip_linkopen"],
			"flip_icon_size" => $Default_Settings["flip_icon_size"],
            "flipfrontcolor" => $Default_Settings["flipfrontcolor"],
            "flipbackgcolor" => $Default_Settings["flipbackgcolor"],           
            "flip_title_font" => $Default_Settings["flip_title_font"],
            "fliptitlecolor" => $Default_Settings["fliptitlecolor"],
            "flip_title_fontfamily" => $Default_Settings["flip_title_fontfamily"],
            "flip_desc_font_size" => $Default_Settings["flip_desc_font_size"],
            "flipdesccolor" => $Default_Settings["flipdesccolor"],
            "flip_desc_font" => $Default_Settings["flip_desc_font"],
            "flip_custom_css" => $Default_Settings["flip_custom_css"],
            "flipbuttoncolor" => $Default_Settings["flipbuttoncolor"],
            "flipbuttonbackccolor" => $Default_Settings["flipbuttonbackccolor"],
            "templates" => $Default_Settings["templates"],
            "flipbuttonbackhcolor" => $Default_Settings["flipbuttonbackhcolor"],
            "flipbuttonhcolor" => $Default_Settings["flipbuttonhcolor"],
            "flipiconcolor" => $Default_Settings["flipiconcolor"],
            "flipbackcolor" => $Default_Settings["flipbackcolor"],
            "flip_textalign" => $Default_Settings["flip_textalign"],
			"flipbuttonborderccolor" => $Default_Settings["flipbuttonborderccolor"],
			"flipbuttonhbordercolor" => $Default_Settings["flipbuttonhbordercolor"],
        );
        foreach ($option_names1 as $option_name1 => $default_value1)
        {
            if (isset($Flipbox_Settings[$option_name1])) $
            {
                "" . $option_name1
            } = $Flipbox_Settings[$option_name1];
            else $
            {
                "" . $option_name1
            } = $default_value1;
        }
?>

<?php 
		require (FLIPBOXBUILDER_DIR_PATH . "template-front/design-" . $templates . ".php");
		wp_enqueue_style('flipbox_builder_flip_design-' . $templates . '');
    endwhile;
    wp_reset_query();
    return ob_get_clean();
?>

<?php
}

Code file location:

flipbox-builder/flipbox-builder/template-front/shortcode.php

Conclusion

Now that you’ve learned how to embed the Flipbox 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 *