1

I'm trying to create a custom user registration form used for Educational website.

Is it possible to automatically retrieve categories of posts (custom posts) in the registration form.

The form should be:

username : password : first name: last name :

optional

(category list) (courses list)

if user choose it will automatically show related sub-categories example:

(course1)
- (sub-course-1)
- (lesson 1)
- (lesson 2)
- (sub-course-2)
- (lesson 1)
- (lesson 2)

Is there a way to do such thing into registration form?

0

The best way to add extra fields to the wordpress user registration form that I know of is to use the related registration form filters:

  1. register_form - This is used to add your fields to the registration form
  2. registration_errors - This is used to validate your fields
  3. user_register - This is used to add your custom user_meta data to the system
  4. and maybe register_post - This can be used to do other things pre-validation
  • Thank you for your reply and suggestions. Is there any example for Register Post Category like a parameter to be added to the registration form that says if user choose Category 1 load all related sub categories and so on. Thank you again! – Zaher Jan 24 '15 at 23:57
  • If you want it to be dynamic, you would need to attach some javascript to it. Otherwise, you could use wp_query to grab all categories and build out your custom category list in a tree style and they could just scroll through and choose one. – Privateer Jan 25 '15 at 14:00
  • thank you for your reply and explanation. Excuse me for asking much. Can you advice me of an example script or code that does the job? Thank you! – Zaher Jan 25 '15 at 14:38
  • Sorry, I don't have anything lying around that does this currently. You might check some of the free subscriber plugins available on the core wordpress site and look through them. – Privateer Jan 25 '15 at 19:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.