I have a project where I’ll be using WP as a customer portal to an external application. The application is accessed via web services (soap/xml) calls.
The application has quite a few forms and for that I plan on using Formidable’s Form plugin. I have the login process modified so the login actually is done remotely and a local user is created if one doesn’t already exist.
Looking ahead a bit I’m trying to understand how I distribute the custom pages I’ll need. I don’t plan on being theme specific. So I imagine I’ll be installing plugins and modify the database (for the custom pages).
My question is there a guide/standard methodology for distributing plugins that is applicable to my situation? When plugins have specific pages how are those installed? and how are the menus adjusted accordingly?
Well, not quite sure if I understood this, but I see that you want to ‘simulate’ pages using a plugin, and my best bet is to build your own posts on-the-fly using WordPress queries and rewrite rules. Let’s try this:
Create a variable to respond to your view.
Create a rewrite rule to fill this variable:
Now, visit your site’s
options-permalink.php
page to flush the rules and make the above one valid (http://yourdevsite.com/wp-admin/options-permalink.php).You’ll be able to access custom URLs like http://yourdevsite.com/forms/some-form or the equivalent http://yourdevsite.com/?form_id=some-form.
Now, as in WordPress we can’t suppress the main query, let’s just override it when a matching
form_id
occurs:And finally create your post:
So, if you want now to create more ‘custom pages’ for — let’s say — a form with a
some-other-form
URL, just create a function namedform_some_other_form
just likeform_some_form
.Obviously, the edit link won’t work as will send you to an nonexistent post in admin.
And for the menus, as you ask, I suggest inserting these pages as custom links.