I just back from some week hard working on our themes.
As you know, the KingComposer – KC 2.5 has many features. Section manager is one of supper feature for theme author. Today, I will introduce how to use that into your theme and I will have a small snippet for importing sections into your customers site.
What is a section on KingComposer?
Simply, A section is created by one row or set of rows. There are many other elements on each row.
You can create and save rows into a section, then use them wherever & whenever you want. You can add or edit a section (Add more rows, add a screenshot to it, etc.) similar a page on website, even with Live Editor because Section on KC, it is a post type
How to add rows to section ?
- Use your mouse to focus on row then press Save To Section as screenshot
In backend editor, It will look like
2. A popup appear, then you can select add new one or append into already section before – even over write old section with current row content.
3. After press (+) button, new popup show on. You can see the content of that editor is content of row.
You can set thumbnail for that section as Featured Image or use static image link. In case you use static URL, you can set thumbnail by click on page setting, then paste URL of image into Thumbnail field as screenshot
4. Now just save your section with Publish button. You can view that section in frontend by press View link on top admin bar.
How to add section into a page?
Firstly, to add a section (stored before) into a page, you just go to footer bar on KingComposer page builder then press Sections buttons
Then a popup show up. Now you focus on section you want to add and select method Include or Clone
Notice: With section on KingComposer, we have two ways to import section into page.
Clone : This method allow you import section content inside page when you edit, you can change content of that section immediately without effect to content on section stored.
Include : That is method allow you import section into many pages but content for that section on all pages are controlled via section manager. It means, when you change content of section, it will be changed on all page which use that section.
With Clone method, you can see the content of section and edit them easy.
With Include method you will see the thumbnail of section and some controllers.
It is easy to use with your theme, right?
What theme author should do after store section?
After export your rows into sections. Now you just need to use Export function of WordPress to export into xml file and include to your theme sample data.
Your customer can use that as sample data and import to use without import other pages.
Of course you can use for import sample data function on your theme if you have it.
I created simple function to run import sample data when theme actived. You can download from link bellow. It is a theme, just install theme and active. Then install KingComposer page builder and check KingComposer > Section Manager menu.