Frontend Publisher

This shortcode will display the frontend publisher.

How to Embed This Shortcode in Editor

[userpro template=publish]

How to Embed This Shortcode with PHP

<?php echo do_shortcode('[userpro template=publish]'); ?>

Shortcode Options

Example

Options are used to customize the shortcode and can be assigned as a pair option=value in your shortcode like this.

[userpro template=publish option=value]

  • publish_heading – This is the title of frontend publisher widget. Default: Add a New Post
  • publish_button_primary – This is the “publish” button text which submits the post via frontend form. Default: Publish
  • deny_roles – If you want to disable specific roles from posting from frontend publisher, enter a comma seperated list of User Roles to disable frontend publisher for. e.g. subscriber (To not allow subscribers to use this frontend form)
  • taxonomy – To automatically add new posts to specific category (instead of letting user choose it) enter the category taxonomy here. e.g. category or post_tag or another taxonomy.
  • category – If you set specific taxonomy for new posts, enter the category ID/slug (or multiple category IDs/Slugs) for the new items. This option can be single or comma seperated category IDs or slugs. e.g. news,sports,soccer or 1,8,15
  • allowed_taxonomies – If you enable user to choose his own categories, enter the allowed taxonomies here (Seperated by a comma) Default: category,post_tag (Which will allow Categories/Tags and can be extended to custom taxonomies)
  • post_type – Enter allowed post types for the frontend publisher. For example, to allow user to make posts, or pages, or custom_type use this: post,page,custom_type. Default: post (Allow Posts only)
  • post_meta – A comma seperated list of meta keys to collect on the frontend publisher (Post Meta). The value should be keys only e.g. custom_url,_my_custom_meta_key,etc.
  • post_meta_labels – Required if you use the above option. A comma seperated list of labels to present the meta keys you want to collect.If you add the post meta it is important to used both option post_meta and post_meta_labels in shortcode. e.g. Custom URl,Thumbnail URL,etc.
  • require_title – To make the title field required or optional. Default is 1 (required)
  • require_content – To make the content field required or optional. Default is 1 (required)
  • require_featured – To make the featured image field required or optional. Default is 1 (required)
  • require_CUSTOM_FIELD – To make the any custom field (added with post_meta option above) required or optional. Default is 0 (optional)
  • publish_field_order – This option lets you control which fields are included in any frontend publisher shortcode, and also controls the order of fields. e.g. Add the fields you want in the order you want with comma as seperator. example: publish_field_order=”title,content,featured_image,category,post_type,custom_field1,custom_field2,custom_field3,etc.”

Enabled auto-posting on Facebook

When a user publishes a new post via frontend publisher or when a user follows someone,you can update this on Facebook.

Options to enable this auto-posting and editing the text available via UserPro -> Settings -> Facebook Integration

Was this article helpful?

Related Articles

Leave A Comment?