HI, sir when i tranlsate my english post another language then my post meta data fileds not copied, im using custom post meta data.. can you tell me how to solve this
ok got it, one more thing, i have custom fields which i have changing multiple times like every months or weeks , i want to display same as my default, i have attached screen short, can you please tell me which filed i you are using to detect orignal post, i share my code
You can retrieve the original post ID using the wpml_object_id function. Pass the current post's ID and the post type to get the original post's ID. Here's an example:
$current_post_id = get_the_ID(); // Get the current post ID
$original_post_id = wpml_object_id($current_post_id, 'post_type_name', false, 'original'); // Replace 'post_type_name' with your post type
wheni user
$current_post_id = get_the_ID(); // Get the current post ID
$original_post_id = wpml_object_id($current_post_id, 'post', false, 'original'); // Replace 'post_type_name' with your post type
echo $original_post_id; // getting orignal post id
Fatal error: Uncaught Error: Call to undefined function wpml_object_id()
Languages: English (English )German (Deutsch )French (Français )
Timezone: Europe/Zagreb (GMT+02:00)
I split this topic into a new one, for our support rules, and will reply there.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.