Jump to content


This topic is now archived and is closed to further replies.


How to include multiple sections into one plugin

Recommended Posts

I've figured out how to turn a single section into a plugin by looking at the code for the PL Next Box. And this loads into DMS with no problems. 


Here's an example of the header

  Plugin Name: SMS Spacer
  PageLines: true
  Version: 1.0.0
  Section: true
  Class Name: SMS_Spacer
  Filter: component
  Loading: active

class SMS_Spacer extends PageLinesSection {
  //do section stuff

However, I have yet to figure out how to load in a pack of sections from one plugin. Is this possible?


Am I posting this message in the most applicable forum category?


Share this post

Link to post
Share on other sites
James Giroux

Hey There,


A lot of people use a section wrapper to create the effect you're going for.  If you look at many of the third party sections that are out there you can see how it's done.  We also have a starter section that you can use for reference.




The way it works is that the first level is the 'plugin' which tells WordPress to look in the sections folder.  In that sections folder you can put multiple sections, at least I believe you can. I personally haven't tested it out in a while.  


The reason for that is because when you're creating extensions for WordPress, the best practice is to separate functionality into multiple plugins/sections. This way users can choose which functionality they want enabled and which they don't.


Hope that helps!



James Giroux, CEO

Share this post

Link to post
Share on other sites

Great. I'll give this a try.

Share this post

Link to post
Share on other sites

  • Similar Content

    • sakkthi subramaniyam
      By sakkthi subramaniyam
      Working on a very old site which has  pagelines framework theme. I need section plugin. so i can install postpins section. I have lost backup copy.
      Thank you.
    • yemoonyah
      By yemoonyah+
      Hi, even though I just got a SSL certificate, I can't get the green padlock to appear due to the following error:
      :A file with an insecure url of "http://yemoonyah.com/wp-content/plugins/pl-section-boxes/check.svg" was loaded via the javascript file: https://yemoonyah.com/wp-includes/js/jquery/jquery.js?ver=1.12.4 on line 3. The insecure URL may not be directly contained in the script file and may exist elsewhere."
      I figured if I delete and re-install the plugin it might fix the problem but will my boxes on the website still be there? Or do I have to redesign everything all over again if I delete the plugin and then re-install it?
    • elementalkites
      By elementalkites+
      Good evening. I am attempting to use the Impulse section on a page I am working on (https://dev.elementalkites.com). The tool seems to have the ability to overlay a logo on top of the slider images but in my case it isn't working, even though I have added the logo file and given it a height to display at. I have attached a screenshot for reference. Any help would be appreciated.
    • Steve Webb
      By Steve Webb+
      I am having an issue with DMS editor not loading.  Just keeps spinning and spinning.
      Have tried several things - Logged in and out, cleared cache, deactivated all plugins, but the issue persists.
      I even had our host restore from a backup a few weeks ago, when I know it WAS working, as I edited a text box on the homepage.  The restore from backup didn't help either.
      Also, the front end of the site shows that the site is framed, or boxed now (whatever you call it), instead of full width as it was previously (last week).
      Dev console shows that there are php errors in Google maps - file is attached.
      Can someone please help?  Not sure what else I can do here...
      Thanks in advance.

    • tuciudadenred
      By tuciudadenred+
      Hi everyone, what happens is that the web page metrosalarmas.com has a google tags which I have not attacked where I can look to remove those tags and be able to locate the correct ones.