Synchronize Post metafields - wordpress

In the Woocommerce product Backend, I got under the general tab an “EAN” Field (coming from my theme) and I got a “GTIN” Field (coming from Germanized pro) which automatically gets filled threw the JTL connector.
But just the “EAN” field gets displayed on the product page.
So I want to synch both post meta fields. So the “EAN” field should automatically get filled with the value of the “GTIN” field.
How do I get this done?

Related

In WooCommerce, where do I get more detail about the dtwpb_single_product_page?

In WooCommerce each product has meta_data and in that collection there's a field called dtwpb_single_product_page. The field contains a number which resolves to a WooCommerce Page Builder Product Template. There are WPBakery Page Builder icons all over, and I've been to their site but can't see anything regarding a REST API, which is how I'm forced to interact with the site.
Programmatically, how do I go from the number to template? I'd like to be able to extract the name and the fields with field name and field type. How would this be done? I have fully authorised access to the site.

Display custom post types filter by ACF with current user

I would like to display my custom posts on frontend.
I made a back office for a mobile app, but I'd like to create access from frontend to display information from my back office. First, I try to display single content from a custom post. I need to filter these pages by a custom ACF field equal to my current user.
And I need to check if the user has the good role. I've already configured all my Custom posts, all my ACF fields, and custom roles. I made a specific plugin for my back office.
I would like to create specific shortcodes to display the differents single views and the different lists I'll will need for my back-office..
Custom option
Value
Custom posts name
page_clubs
ACF field related
administrators
Custom role
club_administrators, or club_members
User
Current

Add specific employee to a page in wordpress

We have created many pages in Wordpress and want to add an employee (name, phone, email etc.) to every page as responsible contact person. Now we want to add every contact person once in the backend and choose the right person in the page.
We also use Advanced Custom Fields (ACF) and could add a Field for adding the data, but it could be difficult if the employee gets a new phone number for example.
Has anyone an idea how to solve it in wordpress?
My proposition is:
Add custom post type named "Employees" to your WordPress.
Add custom fields (based on ACF) for contact data and assign them to mentioned post type.
Add post object field to your pages and assign employees post type to this field.
And it's done! Now you can assign a specific employee to your page as a post object and display data from it, like this.

How to create a RTE box for 1 field of a custom post type

For a wordpress site we're developing, we import data from somewhere else and add them as custom post types to the database. For these fields the customer wants to be able to manually edit one of those field with an RTE interface. How do I do that. The site is using Custom Post Type UI to show the posts in the backend, but they're all extra fields. I want one of these fields to be an textarea with an RTE, how do I do this?
These are the fields as shown in Wordpress. vac_description should be an rte

Wordpress custom post type structure

i am building a wordpress website for a client. i need to build 1 template type of page with a list of fields that the client can fill in to populate the page. so lets say i build a template page called Person Template. On it i have an empty picture placeholder on the left and an empty Name Field below that. On the right i have an empty "persons phone number" and "Persons email" field.
what i need to create somehow is a system that the client can enter these 4 items into wp-admin somewhere and save that as a new Person. Then they can repeat and save another Person until they have created say 100 Person pages.
How do I do this? I tried building a Custom Post Type called Person CPT. I have built a Page called Person Template. I have built some "Person CPT" posts and put them on a page but i dont know how to create the Entry Fields page for my client to use.
You're correct that you'll need to use a custom post type. To add the fields you have two options:
Add the fields using add_meta_box(). You'll then need to save this data as post meta. Then in your single-person.php template you would retrieve the meta using get_post_meta(). It's a tad cumbersome, as you need to write the markup for the meta box, hook it into an action to add it to the admin page, and verify the content before it's saved. Here's an article that walks you through it
Alternatively get yourself the Advanced Custom Fields plugin: it makes adding additional fields very quick and easy. I use it all the time.

Resources