Hot answers tagged

2

I assume you would like to end up with something like this: Code way If you want to put this logic in your template/plugin, as you state in your question, there is quite a bit of coding. You need to: create custom post types create metabox for seller create content for metabox - that's called "callback" in the meta_box docs create logic that saves data ...


1

Based on the code you've posted I assume cl_guest post meta contains an array of post IDs. Building upon this assumption, you could do something like this. 1) Add these helper functions to your theme's funtions.php file // custom template tag to render guests function render_guests( array $guests ) { if ( $guests ) { // you could use foreach loop ...


1

It's a bit more complicated than just using a plugin but it's certainly doable. Since you don't provide examples of your code (as of 2019-08-28) I cannot use it in my answer so I'll try to be as specific as possible in pseudo-code. The way I usually do it is to create a meta_field (get_post_meta, update_post_meta) with your custom post type (CPT) ID. In ...


1

You'd need a repeater relationship custom field. The easiest way would be still to user a plugin for this part – I'm very happy with ACF1 – but there are quite a few options. One advantage is they provide a font end forms option so you could move the editing for your customers in the front-end (without the need of visiting /wp-admin) – this requires a bit of ...


Only top voted, non community-wiki answers of a minimum length are eligible