View Categories

Adding Documents

3 min read

Admin Posting

Most of managing Portal posts is the same as managing any post. The difference is the extra meta-boxes which are available on the post itself.

Portal Documents – here you can remove or download a document, and upload a new one to the post.

For files removed from posts, you can manage these in the Smithy Portal Settings page.

Portal Fields – at the bottom of the post will be any custom fields you create for it.

Front-End Posting

Smithy Portal includes two Form Actions you can add to any Breakdance form, Smithy Create Post and Smithy Edit Post. To enable the creation of new posts front-end, add any page and edit it in Breakdance. This will be your front-end page for users.

Add whatever you want to the page, and include a form. You will then need to wire-up the form to manage posts. We assume some knowledge of using forms here but will detail the specific parts needed for our post creation page.

Known limitation

When creating the portal the intent was to make a plugin anyone could use, without needing other plugins. However, Breakdance Forms do not currently offer any way to add a custom field type. Therefor all text fields are plain text – there is no rich text option. This means you need to build templates with small, distinct text areas. If ever the rich text field becomes possible, it will be added and more complex post-content will be possible, for now it’s plain text, images and use of dynamic data for things like button links.

For this reason it’s recommended you don’t use post content – instead, create a custom text-area field and use that for a ‘long text’ option.

Wiring Up Forms

You need to build your form with fields that match the data required, like post title, excerpt and any custom fields you added. All these fields will be connected to the right post filed using our form action.

Smithy Portal uses the default File Upload field for our attachments, so add one of those too, if you want to enable files.

The term field for choosing a category can’t easily be wired in, so Smithy Portal manages that. Add a select field and give it an ID, but NO OPTIONS! We will wire this up in the action below.

Form Action – Create Post

The Create Post action isn’t limited to our Portal Post Type. Feel free to use it to enable front-end submissions for any post type. Yay, bonus prizes!

The settings are mostly obvious, choose your post type, decide what status posts have when created, either connect a field for the title or enter fixed text (or fixed text plus a field).

Simply connect every field to the post fields. For the more custom meta you can use the Meta Field Mappings – and select the form field, then enter the custom field key.

Now we can wire up our taxonomy. In the Term Field choose the empty select field we added. Then choose the Term Taxonomy we want. Smithy Portal will then automatically populate the select with the top-level terms in that taxonomy.

You’re done! You now have a front-end form to create posts with optional file attachments.