Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi James,
I've not used Posts Table Pro, so I can't say about it. But you can do it with Meta Box plugins.
Do I set up 2 custom post types? 1 for dealers & 1 for salespeople & connect them using MB Relationships? Or do I make everyone a WP user & add custom fields to Users with the User Meta extension?
This is a great question and I think the most important question, no matter you choose to do it by your own or use Posts Table Pro plugin.
I'll list the pros and cons of each method and you can choose one (just note that both methods work!):
Using post types:
- Pros: You can benefit from WP template system (e.g. archive page, single page)
- Cons: There's no login for post types. So you still need to create a post for each user and connect it with the user. You can use MB Relationships for that purpose or just usepost_authorattribute from WP.Using user profile:
- Pros: No need to create a post type for users and no need to connect that post type with user.
- Cons: You have to work on the template by your own (querying all (one) users and display their info).In long term, I think the 2nd method is better since the data is more simpler to understand. The template issue is not a big problem, I guess.
Anh Tran
KeymasterHi,
If you need to modify field value before saving into the DB, please use rwmb_{$field_id}_value filter or use rwmb_after_save_field action.
Anh Tran
KeymasterThanks for your feedback. I'll check and fix this bug.
Anh Tran
KeymasterHi Allan,
The shortcode
rwmb_metayou use assumes that the field value it gets is for the current post (which is a dog profile). That's why it doesn't output anything, since cat's age is a cat's custom field.To display a custom field of a cat profile, please pass the
object_idto the shortcode:[rwmb_meta id="cats_age" object_id="123"].February 3, 2020 at 8:09 AM in reply to: ✅Getting the entire options array, deleting the entire options array #18104Anh Tran
KeymasterHi,
All the option is stored in a single option in the WP database. So you can just use
get_optionanddelete_optionfunctions to get and remove them. Just note that you need to pass theoption_name, not settings page ID.Anh Tran
KeymasterHi guys, sorry for not following up the thread. I think the solution above should work. Please let me know if you have any trouble with that.
February 1, 2020 at 3:23 PM in reply to: ✅Beaver Themer Field Connecter Not Working with Users #18090Anh Tran
KeymasterHi, I've just updated the plugin on Github to support post author's and user's custom fields. Please try it and let me know if you need anything.
Anh Tran
KeymasterHi,
I think "matches" is a many-to-many relationship, and you can use the plugin to create that relationship between users.
February 1, 2020 at 9:55 AM in reply to: ✅Beaver Themer Field Connecter Not Working with Users #18085Anh Tran
KeymasterHi, user meta is not supported yet. It's in our list of task and we'll do it soon.
Anh Tran
KeymasterHi Spencer, I've tried network activate the plugin and don't see that error. I guess you install both the AIO plugin (which has Elementor Integrator extension activated) and the separated Elementor Integrator extension. If that's the case, please delete the individual Elementor Integrator extension.
Anh Tran
KeymasterThank you for your kind words and your feedback. We keep improving the plugin and will try our best to make it more useful for you!
Anh Tran
KeymasterHi Nick, I've just updated AIO. Please try again.
Anh Tran
KeymasterThe latest version is 1.2.6. It's already available since October last year.
If you use Composer to update, please delete the vendor folder, clear Composer cache and run
composer installagain. For details, please see this docs.January 31, 2020 at 11:33 AM in reply to: ✅One-to-many relationship on "bay_mb_relationships" #18072Anh Tran
KeymasterHi,
If you want to force only one connection from one side of a relationship, please set
'max_clone' => 1to the field on that side, like this:add_action( 'mb_relationships_init', function () { MB_Relationships_API::register( array( 'id' => 'workout_to_workout_exercises', 'from' => array( 'object_type' => 'post', 'post_type' => 'workout', 'field' => array( 'max_clone' => 1, // Limit to 1 connection only. ), ), 'to' => array( 'object_type' => 'post', 'post_type' => 'workout_exercises', ), ) ); } );Anh Tran
KeymasterHi Kevin,
I've just tested and found that the
wp-load.phpfile loads everything and thus, runs all necessary actions, including theinit. That means when including that file, theinitaction is already fired, and meta boxes are registered. When switching to another site in the network, we simply switch the options/configure/themes, etc. and the actions are not triggered again.I'm not sure if there's a way to change that behavior. I don't have a solution for that at the moment. I'm very sorry.
-
AuthorPosts