Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Website development strategy WordPress

  • SOLVED

Please can the community provide some considered advice for a membership project I am about to undertake. The site will enable paid subscribers to post news, events, questions, classifieds (all separate CPTs) and comments.

Read access will be universal, but to post or comment requires a paid membership. I would like to conduct everything from the frontend, disabling access to the default WordPress admin area.

Members will be registered with Author-level access, but only after a confirmed PayPal transaction.

The frontend forms to create CPT’s would be pretty basic – title, content, thumbnail and a couple of pieces of metadata – dates for events and custom taxonomies for tagging and categorization.

Basic form validation would be required. Has the title field been completed? Is the title field less than x number of characters?

Questions and Classifieds will be published automatically, but News and Event listings will need approval from an editor before publication.

My initials thoughts were to run with Formidable Pro for frontend post creation and editing. I’m a big fan of Gravityforms, but would prefer native CPT and post editing support, hence Formidable Pro.

What worries me about a forms-based solution is: 1) the dependency it creates on the chosen plugin and 2) the additional database overhead of form entries existing alongside post entries.

Really I just want to create a post entry and have this managed via a frontend form interface. I considered using something like Barley for frontend editing, but really would prefer a consistent posting and editing experience.

I am wary of employing an existing Membership plugin - again because of plugin dependency/lockin. From my research, the plugin that probably most closely mimics what I am trying to achieve is WP User Frontend Pro.

Given that my coding skills are limited to HTML, CSS and basic PHP and Javascript, an existing plugin solution would appear a very attractive solution for this project.

I’ve been using WordPress for several years now but wouldn’t dare call myself a developer – more a themer perhaps. I don’t mind getting my hands dirty with some custom coding, but always try to look for the most efficient way to complete a project given my limited programming skillset.

Should I bite the bullet and go with an existing plugin solution or would I be better to try and code the forms and posting functionality myself?

Would a few well-worded questions on WPQuestions be enough when I got stuck, or should I massage an existing plugin or framework (recommendations much appreciated) to my needs?

Thank you in advance for everyone’s suggestions.

Answers (3)

2014-10-16

Remy answers:

The plugin solution will always be the best in my opinion, even for a good developer. Creating something like this from scratch takes a lot of time, that could be used for something else when a good solution already exists.


designbuildtest comments:

Many thanks Remy. Given the scenario I describe above, what would be the key plugins you would choose for this project?


Remy comments:

Restrict Content Pro can be a good alternative for the membership part. It's maintained by a great team, as lot of add-ons if needed and great support.

As for the front end, I'm used to Gravity Forms, but Formidable Pro looks good. I don't really like WP User Frontend Pro, I add to use it once a client website and it was kind of messy.


designbuildtest comments:

Thanks Remy. Restrict Content Pro looks very powerful. In this instance however either Gravityforms User Registration Add On or Formidable Pro User Registration Add will probably do the trick. My greater concern is around frontend posting or editing. Any suggestions/advice?


Remy comments:

Frontend posting and editing is absolutely possible with both. You might need some custom code to add tinymce for the post content with GF, but other than that I think you will be covered


designbuildtest comments:

I've found frontend editing with GF (via the [[LINK href="https://wordpress.org/plugins/gravity-forms-post-updates/"]]Gravity Forms Post Update[[/LINK]] plugin) a little unsatisfactory to be honest. I am also fed up with a lack of native Custom Post type support in GF. For these reasons I actually purchased Formidable Pro. Don't get me wrong, GF is great, but not for frontend post editing. Is there anything else out there other than GF or Formidable that might be worth investigating?


Remy comments:

Ninja forms and its add-ons can also be worth a look, I didn't test it myself but a fellow dev told me its good


designbuildtest comments:

Yip, Ninja Forms looks pretty impressive. Was hard to choose between Ninja Forms and Formidable Pro, but I ended up choosing the later based on price. The support at Formidable Pro has been top-notch so far. GF have some real competition in this space now.

2014-10-16

John Cotton answers:

If you're happy with the way a plugin looks and works, then that's a good route to go.

The best plugins allow a large amount of presentational and functional customisation so you might well find that they are more than sufficient.

Triggers to go a custom-code route might be:
* Highly custom design/interface that is not achievable without plugin modification
* Complex workflow with the forms
* Custom validation or 3rd party integration

So it really depends on what you want the forms to do and how you want them to look.


designbuildtest comments:

Cheers John. My requirements are fairly straight forward I hope. The biggie is the front-end post creation and editing. Other than a wee bit of validation on the title field, I need a content box (not even TinyMCE - want to keep things really, really basic), thumbnail, excerpt, custom taxonomy support plus a couple of custom meta fields.

I've actually already got a working prototype up and running using Formidable Pro. The major reservation I have is around the extra overhead (trivial probably, but overhead nevertheless) in the database with form entries sitting alongside the actual posts.

I'd love to role a Gravityforms solution (I've done plenty with GF in the past), but this is one area they really need to improve on relative to Ninja and FP (native front-end CPT creation and editing that is).

Also, with what I am doing I'd really like to drop the form plugin dependency entirely.

I've tried to keep form requirements super simple and was hoping someone could maybe point me in the direction of a comprehensive online tutorial for front-end post creation and editing.

Any further thoughts you might have very much appreciated.

Cheers again


John Cotton comments:

Front end creation of CPTs and taxonomy relationships is really easy.

Here's some typical code (this is for an ajax-posted form but the principle is the same)


$project_id = intval( $_POST['project_id'] );

if( wp_verify_nonce( $_POST['ajax_flag'], NONCE ) ) {
$response = array();

$post_status = isset( $_POST['project-publish'] ) ? strip_tags($_POST['project-publish']) : 'publish';

$post = array(
'ID' => $project_id,
'post_content' => strip_tags( $_POST['project-description'] ),
'post_title' => strip_tags( $_POST['project-title'] ),
'post_status' => $post_status,
'post_type' => 'bc_project',
'post_author' => get_current_user_id(),
'post_date' => date( 'Y-m-d H:i' ),
'post_date_gmt' => get_gmt_from_date( date('Y-m-d H:i') )
);

if( $project_id == 0 ) {
$project_id = wp_insert_post( $post );
$msg = __( 'Your project has been added!', 'xxxx' );
} else {
$project_id = wp_update_post( $post );
$msg = __( 'Your project has been updated!', 'xxxx' );
}

if( !is_wp_error( $project_id ) ) {
update_post_meta( $project_id, '_word_count', $_POST['project-word-count-field'] );

if( isset($_POST['project-featured']) ) {
update_post_meta( $project_id, '_featured', $_POST['project-featured'] );
do_action( 'set_project_featured', $project_id );
}

wp_set_object_terms( $project_id, array_map( 'intval', (array) $_POST['project-budget'] ), 'project_budget' );
wp_set_object_terms( $project_id, array_map( 'intval', (array) $_POST['project-budget-type'] ), 'project_budget_type' );
wp_set_object_terms( $project_id, array_map( 'intval', (array) $_POST['project-category'] ), 'project_type' );

$response['project_id'] = $project_id;
$response['files'] = bc_attach_files( $project_id );

$response['notification'] = array( 'msg' => $msg );

} else {
$response['notification'] = array( 'msg' => __( 'Hmmm....something has gone wrong...we are looking into it!', 'xxxx' ), 'state' => 'alert-danger' );
}

wp_send_json_success( $response );

}


designbuildtest comments:

Great! Many thanks John. I think this is starting to look more like what I was hoping for.
Although I wasn't expecting working code examples, I wonder if it would be worth opening a new question when this one ends where I ask for actual usable code? Any thoughts?


John Cotton comments:

Sure, although that is "actual, real code"!

Swap the meta key, post type and taxonomy names and it will work with whatever you need.

2014-10-16

Firoja_Imtosupport answers:

Hi,

You can go with plugins, if plugins are paid, you will get free help from them, anything unmanageable by you, We all are here to help you anytime by wpquestions.


designbuildtest comments:

Hi there, thanks for the advice. If I choose the plugin route, what solutions would you suggest I employ?


Firoja_Imtosupport comments:

Hi,

You can use below plugins:
Theme my login
Are_paypal
Types