This is how you can get the post object of a page with a matching path, minus the /en
part:
$page_path = get_page_uri( get_queried_object_id() ); // en/page/child-page
$target_page_path = str_replace( 'en/', '', $page_path ); // page/child-page
$target_page = get_page_by_path( $target_page_path ); // WP_Post of target page.
Related Posts:
- Modify theme to get page excerpts on front page
- How to get the list of posts in a static page other than front page?
- Pulling posts tagged with similar title name
- pagination does not work with query_posts. Help! [duplicate]
- How to configure WordPress to handle 75,000 pages?
- How to disable posts and use pages only
- What is the difference between $paged and $page?
- multi page password protection
- Create a “Dummy” parent page for a hierarchy in page listing?
- Change admin startpage to Pages-page?
- Password protected post or page – error message by wrong password?
- Get next/previous cousin page
- Hide Visibility Option From WordPress Publish Metabox
- How do I turn comments off for pages, but not posts?
- WordPress 4 and wp_editor() Not Showing Visual/Text tabs
- How to make nested page structure?
- Redirect to a page if ancestors is empty
- Get Order of Meta Box in a Page/Post
- Check to see if page exists problems
- Modify Page Title before output via wp_page_list
- Custom /page/2/ template (different from index.php)
- Form action redirect to the same page
- How do I create a separate page for each author?
- Front Page not showing on Pages
- WordPress pages with hierarchy
- How to incorporate Documentation into wordpress?
- Two Search pages, One search form
- Why doesnt ONE of my links in the footer work properly? [closed]
- Create subpage – filter parent pages list
- Use lots of pages, or categories/posts?
- How to have custom tinyMCE buttons break onto next line when too long
- Get all pages that are published
- Add a predefined page to site
- creating and styling a within a page
- What are trackbacks?
- Determine page content based on page parent
- How to enumerate a list of posts?
- Weird issue with is_pages() with array
- Missing ‘Page Attributes’ in page edit
- How to show the root webpage on all subpaths
- How can I redirect to my custom page without loading the Dashboard itself?
- Display custom tags on pages that have a specific page parent
- Loading Multiple Comments Pages via Ajax?
- Change base URL of pages created by certain users
- Remove Content edit box from ALL pages (not posts)
- What is full URL for a post?
- check first and last child pages wordpress
- Special Character Appearing in my WordPress Pages Content
- Prioritize visible content – Page speed issue on Google insights
- How can I check user capability when a page loads (via functions.php)?
- How can I get the blog page ID?
- Proper procedure for wp_insert_post?
- Read more on pages WordPress
- Bad pages redirection
- Parent page shows no child content
- Remove_filter (‘the_content’, ‘wpautop’) only pages
- Weebly Migration to WordPress [closed]
- Need to create a custom page on a website
- Do I have to widgetize my pages?
- Use page template for custom $_GET content
- Custom page only editable by one user
- Page Title repeating
- Password Protect Pages Not Working
- Can I connect a page to a taxonomy?
- query_posts doesnt show pages with given ID when post_type => page
- wp_nav_menu: output featured image of each page listing
- Prompting for review / reapproval of page content
- Limit the amount of main pages
- Change displayed “page name” to distinguish multiple pages with the same title
- add title to widgets of wordpress
- How to transfer a site to hosting?
- Add the same content to multiple pages
- How can a .css file be applied to a virtual page?
- Checkboxes to automatically create pages when I activate a theme
- Share a folder with files
- Front Page post mirroring revisions to other pages, constantly updating itself
- Microsoft Security Essentials is blocking my WordPress website in IE11
- Cannot use old slug – it just 301s to site home page
- Author information on all pages
- Display inner pages like posts.[Like how post excerpt works]
- include exception inside theme for empty widget area
- How to display time when page is created and edited
- Add role and edit page capabilities
- Add text to the bottom of particular pages
- Access wordpress pages using a self signed shared ssl
- Page loads all pages of the image gallery with pagination
- Group Pages based on Parent in Admin Area
- WordPress, page 2 shows the same posts as page 1
- How to exclude page in pages module
- get id custom tables on current page
- static page with buton that opens collect email form
- Subpage Conditional
- Multiple WordPress Pages
- How to create an user defined page?
- I have over 3000 child pages – but I need a different main page
- How to enable automatic search results in WordPress
- How to make a conditional statement that checks if the page is the child of a certain page?
- Is it possible to keep the page title from actually appearing at the top of the page?
- Edit the text location of a form
- Missing page on wordpress “Pages” dashboard [closed]