addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobe--smallglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1launch-new-window--smalllight-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Cleveland Web Design and Development Meetup Message Board Classes › Layout the_content() Plugin Creation Meetup!

Layout the_content() Plugin Creation Meetup!

Aoirthoir An B.
aoirthoir
Cleveland, OH

For the next 4 to 9 weeks we'll be learning how to create plugins for WordPress by, you guessed it, creating a plugin! I say 4 to 9 weeks because we might finish it quickly, depending on how much we all understand. On the other hand, if we need more in depth discussion, creating the plugin might take as many as 9 weeks. Remember at 2 hours a week that's more like 1 day and a coffee break, for those of you heathens that drink that disgusting goo.

The Plugin (Layout the_content())

Alright so what is the plugin we will be creating? It's called Layout the_content(). Why? What is "the_content()"? What's the purpose of the plugin? Read on true believers, or even you skeptics who STILL refuse to join my most awesomely awesome cult of Aoirthoir The Awesomely Awesome. Or for that matter the Cult of Laurelly Laurel. She's looking over my shoulder as I type this, most dubious. Someone clue her in please!! And by please I mean something I cant think of the word for.

the_content()

The Content (hereafter the_content() ) is a WordPress function or in WP parlance a TAG. It is used inside of a template to output your posts' or pages' content. You know, that stuff you type into the CONTENT box of a post. The one with the two tabs labelled VISUAL and HTML.

The Problem

Using Visual mode OR HTML mode, you can craft some pretty neat designs and layouts of your post. These designs and layouts will carry from one theme to another, since all themes use the_content() tag (actually as mentioned a PHP function created by the WP peeps. I like that WP Peeps... say it with me three times....). And that's well and good if YOU, the pro (hereafter THE PRO) are the one authoring posts. You have a specific layout for certain types of posts, and you know you can just copy and paste your HTML, all is well and good.

But then you turn the site over to the client, or employees or whatever (hereafter OR WHATEVER) and all heck-o-my breaks loose! You give them the same HTML, and say, LOOK OR WHATEVER, DONT toucha this part right there, its magic. Just replace the thing that says REPLACE ME. But do they change REPLACE ME. HECK-O-MY NO! They replace your wonderfully crafted HTML. So what's THE PRO to do?

Enter

THE SOLUTION MUAHAHAHAHAH

Hereafter known as LAYOUT THE_CONTENT(). This will be a fine little plugin that does the following:


  • Provides Admins with a CUSTOM POST TYPE that allows them to create a layout template.
    (This is really neat because admins don't have to learn another method of creating a custom layout. They can just do what they are already used to doing.)


  • Provides Admins with an interface for creating custom forms and fields for each custom layout they create.
    (So this means for instance they could have a custom layout labeled REAL ESTATE PROPERTY and a form with fields for Address, Number of Bedrooms, Bathrooms etc... See below to why this is handy.)


  • Allows admins to create new custom post types.
    (Example REAL ESTATE PROPERTIES, MOVIES, PRODUCTS, REALLY TASTEE MUSTARDS FROM THE SOUTHERN REGION OF FRANCE BUT NOT THE WEST, you know IMPORTANT custom post types like those.)


  • Allows admins to attach their custom layouts to one or more custom post types.


  • Presents authors with the forms that match the custom layout of the post type she is editing.


  • FINALLY SCHMINALLY takes all of the data from the custom form of a particular post, and formats it using the CUSTOM LAYOUT for that post type.


  • The best part of all is that we will all make ONE MILLION DOLLARS or NOT! from this plugin!


  • OK the real best part is this plugin will work NO MATTER WHAT YOUR THEME is.

Sooooooooooooooooooooo who is planning on coming? You really should if you have not already RSVPed. I meant it! Like NOW! Listen bucko! I meant it and when I says I meant it, wait where is the chocolate bunny I bought at the dollar store the other day? Ah who cares it was too sweet, like yers truly*!

(Yers truly is not Aoirthoir. Trust and believe.)

So there yous peeps go. That's what we are doing Thursdays (and maybe Sundays if we get enough peeps peep'n in) for the next several weeks. JOIN US.

Slan Go Foill.
Chifidh me sibh!



Powered by mvnForum

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy