Jump to content


Photo
- - - - -

How to include multiple sections into one plugin

section sections plugin dms load

  • Please log in to reply
2 replies to this topic

#1 rsmm

rsmm

    Member

  • Members

  • 25 posts
  • LocationWashington
  • Framework Version:2.0.2
  • Country: Country Flag

Posted 18 July 2014 - 12:50 AM

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

Please Login or Register to see this Hidden Content

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?

 

Edited by rsmm, 18 July 2014 - 12:51 AM.


#2 James Giroux

James Giroux

    Community Director

  • Moderators

  • 155 posts
  • LocationOttawa, Canada
  • Framework Version:Developer
  • Country: Country Flag

Posted 19 July 2014 - 12:41 PM

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.

 

Please Login or Register to see this Hidden Content

 

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.



#3 rsmm

rsmm

    Member

  • Members

  • 25 posts
  • LocationWashington
  • Framework Version:2.0.2
  • Country: Country Flag

Posted 19 July 2014 - 09:23 PM

Great. I'll give this a try.







Also tagged with one or more of these keywords: section, sections, plugin, dms, load