This code returns the post ID in the current language.
$translated_post_id = apply_filters( 'wpml_object_id', $post_id, 'post' );
So, you can use $translated_post_id
in is_page
.
Related Posts:
- After disabling WPML multi currency, the currency is still handled by the WPML
- Page not visible in ‘All pages’ after being added through PHP
- $.ajax results in 403 forbidden
- Change WooCommerce currency programmatically on AJAX request
- How to get shared CSS body class between translated WPML pages [closed]
- How to translate the blog date in the Avada theme [closed]
- Pass media upload value to input field
- What does the token %1$s in WordPress represent [closed]
- Experiences with compiling WordPress using Hip Hop?
- WordPress redirect to landing page if not logged in
- PHP/Manual use of images? – 2 Questions
- Custom Yoast Breadcrumbs URL
- Debugging upload problem: What part of WP does actual image-resizing?
- Remove class that has been added by parent theme
- How to use a frontend URL with a Plugin
- Get list of shortcodes from content
- Adding Google Analytics code to the tag of specific pages
- Site Health : An active PHP session was detected
- login wp impossible
- Custom image upload
- How to scale image with equal width and height without distortion?
- How to display recent posts on home page with custom HTML
- Create Logout Link WordPress Admin Menu
- PHP 5.5, w3 Total Cache, and opcache [closed]
- How do I add text in a shortcode?
- How to display php source code inside a post using visual editor?
- Display post image with fancybox
- Attaching a pdf to Contact Form 7 e-mail via functions.php [closed]
- WordPress – how to replace with string on the_content() in single.php
- Getting array of customizer settings
- Ajax – Call to undefined function get_option()
- Display PHP within HTML values
- Show full posts in archive
- WordPress 3.2 query_posts and pagination, permalinks issue
- User management system similar to wordpress one?
- Call to undefined function wp() in wp-blog-header.php
- How does WordPress know wich language is chosen when there is a database connection error
- populate form fields in a loop with ajax
- How to pass Select value from Javascript to PHP to generate select option on change
- Recent Posts Not Showing Only On A Specific Category Page [closed]
- Contact form won’t submit
- Shortcode with PHP issue “Undefined index”
- Using same variable names in files added with get_template_part()
- Custom PHP script throws critical error ONLY when editing page
- Override a function defined in wp-includes/comment-template.php
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- How can i count the post added in relationship field, theme display
- How to get the last category name of a child category?
- How can I add a UTM tag with PHP code to pick up the post slug dynamically in the UTM?
- the_posts_pagination() not working in wpquery
- Using ob_start and ob_get_clean with wordpress shortcode
- Custom meta box values are not getting saved for my custom post type
- WordPress loop by meta key that is an array? and how loop multiple arrays
- Adding regular php file to site
- ACF & Bootstrap Gallery Shows Blank Slides [closed]
- REST API works in browser and via AJAX but fails via cURL
- How to display different submenus?
- Remove slugs from custom posts type
- Simple jQuery AJAX Request fails to run PHP Script
- Update if post with specific title exists
- child parent styles enqueue order
- Pass important values server-side when processing form
- Wp_editor doesn’t send the required data
- pass html code to worpdress
- Use an anchor link to open an iframe inside a WordPress page
- Can ‘Custom Field’ data be inserted into this Short Code?
- In WordPress, how do you make several different editors for a single page?
- Merge 2 product attribute terms
- How do I reset $wp_query in a function?
- Add class to all img if they have a certain ACF field
- How can I check that the acf field value is not a duplicate when adding a post?
- Run do_shortcode on php template using JS function
- global $product is empty string when passed into function
- How to update custom fields when post is published?
- Gravity Forms: How to add PHP function to confirmation conditional shortcode?
- wpdb->query returns different value to phpMyAdmin
- Trouble Accessing Gravity Forms API (GFAPI)
- How do I stop an Image Address from loading in the Browser?
- Add class to image in php
- Add a default style if no Featured image is selected
- When to use wp_register_script() function?
- setcookie() issues on running with HTTPS on WordPress
- missing admin bar and widget in a template
- How to load WP_Editor JS files manually (with AJAX)?
- My own theme’s custom widget areas are not working
- Querying posts from wordpress with 2 or more conditionals
- Importing demo data in Multisite
- Allow BBPress participant role to trash topics
- Posts with Custom Fields does not appear
- How to export database correctly for local to online
- Replace TinyMCE with Custom Built Editor
- Setting field not saving on front-end
- Getting custom field data from cart page to checkout page in woocomerce [closed]
- PHP Use Declared array Variable inside already Declared Array
- php grabbing every post made?
- Running a php code after User clicks a button? [closed]
- How to sort wordpress posts by selecting a year from a drop down?
- WooCommerce Checkout Cart [closed]
- How can I get values from a custom post type depending on where I click on my SVG map?
- WordPress taxonomy and terms question