Creating Custom Featured Block style

In this tip we’ll learn how to create a custom featured block style. This tip is valid from WPLMS version 1.6.4 onwards.

A featured block is a block which is shown in the page builder elements :

and the output looks like the featured blocks is like this :

Lets get started :

STEP 1 : Adding the New featured block in Page Builder 

1. Go to WP Admin -> Plugins -> Editor -> WPLMS Customizer -> customizer_class.php
2. Add the following code in the _construct function :\

PHP Code:

3. Upload the image of your thumbnail on web, for consistency use the below image for creating you own custom thumbnail style :

right click on above image and download the image on your desktop. Edit this to match your corresponding style in page builder for identification.

4. Add the following function in the Class:

PHP Code:


This will now add the thumbnail image in the Page builder components like carousels and Post grid. Refer screenshot :

STEP 2 : Adding the function for New featured block

1. Go to WP Admin -> Plugins -> Editor -> WPLMS Customizer -> customizer_class.php
2. Add the following code in the _construct function :

PHP Code:

3. Add the following function in the Class:
You can add your custom HTML content based on your requirements.

PHP Code:

 

 

Was this article helpful?

Related Articles