Using Visual Composer to Design Your Theme

Using Visual Composer to Design Your Theme

First off, I’m a huge fan of WP Bakery’s Visual Composer.   Anything that could make laying a page out easier for a client is a huge plus.   So, just to be clear, I’m completely biased when it comes to Visual Composer 😉

Last year while making a theme for a client, I realized that instead of making theme options( where the client could add their logo, ect..), why not just let Visual Composer do the dirty work?  That way the end user could customize their header or footer with out knowing any code and be able to customize it further than theme options.

First, I had to add a custom post type called Theme Blocks(‘post_type=block’).

Then in the backend of WP, you need to allow Visual Composer to load under that post type. You can find that under Visual Composer settings screen.

Next, I added the following code to my footer and header files in my theme:

Now if the client wishes to change the complete layout of their Header, they can simply design it in Visual Composer’s interface.

I also added a shortcode to my functions file to allow theme blocks to be called from Ubermenu. This allowed me to create submenu’s with all kinds of widgets and layout styles.

Here is the shortcode for pulling a theme block or any page:

25 Comments

Post A Comment