How to use widget as a shortcode?

Hi Everyone,

Today I will be sharing my experience on building shortcode from registered widgets. I had developed this feature on Styled Store Pro making all the custom widgets available as shortcode. A shortcode can be very useful on using the dynamic content on post/pages content and text widgets.

I hope you guys know how to build custom widgets and shortcode. If not please go through these link:
Widgets API
Shortcode API

Here our logic is to developing shortcode calling the_widgets() template tags on our shortcode callback function. the_widgets() accepts the instance which we will be sending as shortcode parameter. So let’s use default WordPress recent posts widgets on the shortcode
Continue reading



How to Add Metabox On Houzez Child Theme ?


Hello everyone,
Today I am going to share my experience while adding metabox on child theme using on Houzez child Theme
Houzez Theme use plugin to create metabox field on custom post type property as well default WordPress Post type. While using “”rwmb_meta_boxes” filter hook on child theme I came to lost all the metafield created by Houzez Parent Theme. So I start to dig on the code and found that houzez theme provides “houzez_theme_meta” to extend metabox field. You can see this filed on this template:

houzez -> frameworkd -> metabox -> houzez-meta-boxes.php.

Continue reading


How to use wp_dropdown_categories() on widget field?


Hello Guys,

Let’s see how we can implement wp_dropdown_categories() on widget field.

Here I am implementing codex way of making widgets: see here for reference:

You can see more about wp_dropdown_categories() here:

So here we go-> Continue reading


How to crop image in customizer image field ?


Hello everyone,

Today I am going to illustrate on , how to cropped image on customizer.

Normally we use WP_Customize_Image_Control for selecting image on customizer section, but this doesn’t provide you the featured to cropped image on your requirement.
But WordPress provide us class called ‘WP_Customize_Cropped_Image_Control‘ which provide you the featured to crop a image.You can see full code here:
Before starting the tutorial I hope you all guys know how to add section, setting and control on customizer.
Step 1: First create section: Continue reading

How to make slider for woocommerce related product?


Hi everyone, today i am going to show you how to implement slider for woocommerce related products.

Required condition:
1> Here we are using bx slider so i hope you everyone know how to set up bx slider on our theme.
Here is the link:
2> All of you know how hook function on wordpress.

Here we start:

Our first steps is to align all the related products on single row so we are using [woocommerce_output_related_products_args ] hooks. And on customizer i have given user interface to select how many product to display on slider.For this you can see here:

Continue reading


How to make blog post protected?


Hello Guys, today i am going to explain you simple logic on making blog page passport protected.

Step 1: select one of the page as post page. You can select this from dashboard -> setting -> reading -> post page section


step 2: Then you need to find which template is in use to display post page. See here for template heirarchy

Continue reading