Jump to content

Archived

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

rsmm

How to include multiple sections into one plugin

Recommended Posts

rsmm
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.

 

https://github.com/pagelines/pl-starter-section

 

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.


James Giroux, CEO
Groundwork

Share this post


Link to post
Share on other sites
rsmm

Great. I'll give this a try.

Share this post


Link to post
Share on other sites

  • Similar Content

    • Bleuy
      By Bleuy+
      How can I get support on pagelines DMS? The product isn't that old and my skeleton themes aren't working and I can't get support in the same way? 
    • Bleuy
      By Bleuy+
      I have a number of legacy websites that are running on the above version of Pagelines DMS, where the template has stopped working. I am using a skeleton theme to all of them. What do I need to do to rectify this.
       
       
    • 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.
       
       
×