Easy Facebook Likebox Shortcodes

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

Before starting, here is an overview of the Easy Facebook Likebox Plugin and the shortcodes it provides:

Plugin Icon
Easy Social Feed – Social Photos Gallery – Post Feed – Like Box

"Easy Social Feed – Social Photos Gallery – Post Feed – Like Box is a versatile WordPress plugin that integrates your social media feeds seamlessly into your site. It also supports photo galleries and like box functionalities."

★★★★☆ (476) Active Installs: 50000+ Tested with: 6.2.3 PHP Version: false
Included Shortcodes:
  • [efb_likebox]
  • [efb_pageplugin]
  • [efb_feed]
  • [my-instagram-feed]

Easy Facebook Likebox [efb_likebox] Shortcode

The Easy Facebook Likebox shortcode, ‘efb_likebox’, is designed to render a Facebook page plugin on your WordPress site. It uses an array to link the shortcode to the ‘efb_likebox_shortcode’ function. This function takes in attributes and content, returning the Facebook page plugin with the set attributes. It’s a simple way to integrate Facebook into your WordPress site.

Shortcode: [efb_likebox]

Examples and Usage

Basic example – Use the efb_likebox shortcode to display a Facebook Like Box on your website. The only required parameter is the Facebook page URL.

[efb_likebox url="https://www.facebook.com/yourpage" /]

Advanced examples

Display a Facebook Like Box with a custom width and height. It also includes the timeline of the Facebook page and shows the faces of the people who liked the page.

[efb_likebox url="https://www.facebook.com/yourpage" width="300" height="500" show_faces="true" show_timeline="true" /]

Display a Facebook Like Box with a small header and without the cover photo. It also hides the call to action button and does not adapt to the container width.

[efb_likebox url="https://www.facebook.com/yourpage" small_header="true" hide_cover="true" hide_cta="true" adapt_container_width="false" /]

These examples showcase how you can customize the efb_likebox shortcode to fit your specific needs. Remember to replace “https://www.facebook.com/yourpage” with the URL of your Facebook page.

PHP Function Code

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

Shortcode line:

add_shortcode( 'efb_likebox', array( $this, 'efb_likebox_shortcode' ) );

Shortcode PHP function:

function efb_likebox_shortcode( $atts, $content = '' )
    {
        return $this->render_fb_page_plugin( $atts );
    }

Code file location:

easy-facebook-likebox/easy-facebook-likebox/facebook/frontend/easy-facebook-likebox.php

Easy Facebook Likebox [efb_pageplugin] Shortcode

The Easy Facebook Likebox shortcode, ‘efb_pageplugin’, is designed to render a Facebook page plugin on your website. It uses the ‘efb_pageplugin_shortcode’ function to achieve this.

Shortcode: [efb_pageplugin]

Examples and Usage

Basic example – The shortcode is used to render a Facebook page plugin. The ‘efb_pageplugin’ shortcode can be customized using various parameters or attributes (atts).

[efb_pageplugin id="YourPageID" /]

Here, ‘YourPageID’ is the ID of your Facebook page. You can find this ID on your Facebook page settings. The shortcode will render the Facebook page plugin with the default settings.

Advanced examples

Adding more parameters to the shortcode allows you to customize the display of the Facebook page plugin. Here are some advanced examples:

Displaying a Facebook page plugin with a specific height and width:

[efb_pageplugin id="YourPageID" width="500" height="800" /]

In this example, the width and height of the Facebook page plugin are set to 500px and 800px, respectively.

Displaying a Facebook page plugin with a specific language:

[efb_pageplugin id="YourPageID" language="fr_FR" /]

In this example, the Facebook page plugin is displayed in French (fr_FR). You can replace ‘fr_FR’ with the language code of your choice.

PHP Function Code

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

Shortcode line:

add_shortcode( 'efb_pageplugin', array( $this, 'efb_pageplugin_shortcode' ) );

Shortcode PHP function:

function efb_pageplugin_shortcode( $atts, $content = '' )
    {
        return $this->render_fb_page_plugin( $atts );
    }

Code file location:

easy-facebook-likebox/easy-facebook-likebox/facebook/frontend/easy-facebook-likebox.php

Easy Facebook Likebox [efb_feed] Shortcode

The Easy Facebook Likebox shortcode, ‘efb_feed’, displays your Facebook feed on your WordPress website. It uses the ‘efb_feed_shortcode’ function to render the Facebook feed box.

Shortcode: [efb_feed]

Examples and Usage

Basic example – The following shortcode displays the Facebook feed by referencing the id of the Facebook page. The id is a required attribute.

[efb_feed id=12345 /]

Advanced examples

Here, the shortcode is used to display the Facebook feed with specific attributes: id, limit, and locale. The limit attribute is used to control the number of posts displayed, while the locale attribute changes the language of the feed.

[efb_feed id=12345 limit=10 locale="en_US" /]

In this example, the shortcode is used to display the Facebook feed with a custom css class. The class attribute can be used to add a custom css class to the feed, allowing for more styling options.

[efb_feed id=12345 class="my-custom-class" /]

The shortcode can also be used to display the Facebook feed with a specific width and height. The width and height attributes are used to set the dimensions of the feed.

[efb_feed id=12345 width=500 height=600 /]

PHP Function Code

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

Shortcode line:

add_shortcode( 'efb_feed', array( $this, 'efb_feed_shortcode' ) );

Shortcode PHP function:

function efb_feed_shortcode( $atts, $content = '' )
    {
        return $this->render_fbfeed_box( $atts );
    }

Code file location:

easy-facebook-likebox/easy-facebook-likebox/facebook/frontend/easy-facebook-likebox.php

Easy Facebook Likebox [my-instagram-feed] Shortcode

The Easy Facebook Likebox plugin shortcode ‘my-instagram-feed’ is designed to fetch and display Instagram feeds. It allows customization such as the number of feeds per page, profile picture visibility, caption word limit, and more.

Shortcode: [my-instagram-feed]

Parameters

Here is a list of all possible my-instagram-feed shortcode parameters and attributes:

  • wrapper_class – Specifies a CSS class for the shortcode wrapper.
  • user_id – Defines the Instagram user ID to display feed from.
  • hashtag – Allows to display feed based on a specific hashtag.
  • skin_id – Sets the ID of the skin to use for the feed display.
  • feeds_per_page – Controls the number of feeds to display per page.
  • profile_picture – Decides whether to show the user’s profile picture or not.
  • caption_words – Sets the maximum number of words for the caption.
  • links_new_tab – Decides whether to open feed links in a new tab.
  • load_more – Determines whether to show the ‘Load More’ button or not.
  • cache_unit – Defines the cache duration unit.
  • show_stories – Decides whether to display Instagram stories or not.
  • cache_duration – Sets the duration for which the feed should be cached.
  • is_moderate – Determines whether to moderate the feed before display.
  • is_shoppable – Decides whether the displayed posts are shoppable or not.

Examples and Usage

Basic example – Displaying Instagram feed with default settings

[my-instagram-feed]

This shortcode will display Instagram feed with the default settings from the easy-facebook-likebox plugin. It will use the default skin, show 9 feeds per page, open links in new tabs, load more feeds when scrolling, cache the feed for 1 day, and show Instagram stories.

Advanced examples

Displaying Instagram feed with specific user ID and a custom skin

[my-instagram-feed user_id="123456789" skin_id="custom_skin"]

In this example, the Instagram feed from the user with the ID “123456789” is displayed using the skin “custom_skin”. All other settings are kept as default.

Displaying Instagram feed with a specific hashtag and limiting the number of feeds per page

[my-instagram-feed hashtag="wordpress" feeds_per_page="5"]

This shortcode will display Instagram feeds with the hashtag “wordpress” and limit the number of feeds displayed per page to 5. All other settings are kept as default.

Displaying Instagram feed with a custom wrapper class and disabling stories

[my-instagram-feed wrapper_class="my_custom_class" show_stories="0"]

Here, the Instagram feed is wrapped with a custom class “my_custom_class”, and the display of Instagram stories is disabled. All other settings are kept as default.

PHP Function Code

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

Shortcode line:

add_shortcode( 'my-instagram-feed', array( $this, 'esf_insta_shortcode' ) );

Shortcode PHP function:

function esf_insta_shortcode( $atts )
        {
            $mif_skin_default_id = '';
            $Feed_Them_All = new Feed_Them_All();
            /*
             *  Getting the FTA Plugin settings.
             */
            $fta_settings = $Feed_Them_All->fta_get_settings();
            if ( isset( $fta_settings['plugins']['instagram']['default_skin_id'] ) ) {
                $mif_skin_default_id = $fta_settings['plugins']['instagram']['default_skin_id'];
            }
            $atts = shortcode_atts( array(
                'wrapper_class'   => null,
                'user_id'         => null,
                'hashtag'         => null,
                'skin_id'         => $mif_skin_default_id,
                'feeds_per_page'  => 9,
                'profile_picture' => null,
                'caption_words'   => 25,
                'links_new_tab'   => 1,
                'load_more'       => 1,
                'cache_unit'      => 1,
                'show_stories'    => 1,
                'cache_duration'  => 'days',
                'is_moderate'     => false,
                'is_shoppable'    => false,
            ), $atts, 'my-instagram-feed' );
            if ( isset( $atts ) ) {
                extract( $atts );
            }
            ob_start();
            include 'views/feed.php';
            $returner = ob_get_contents();
            ob_end_clean();
            return $returner;
        }

Code file location:

easy-facebook-likebox/easy-facebook-likebox/instagram/frontend/class-easy-facebook-likebox-instagram-frontend.php

Conclusion

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