I think the best way is to create Theme Options and let the administrator decide which page is each one, with a dropdown for example.
This way you can get the selected page no matter the environment.
Related Posts:
- How to get full content including template HTML
- Is there a wordpress function that I can use to retrieve the current page that is loaded?
- Get the url of a page template without using the page slug and ID
- All top-level pages are using index.php as template
- Changing permalink name redirects to another template?
- Permalink for specific page name
- post permalinks with dot in url don’t resolve to correct page template
- Get Posts Based on Tag Matching Page Title
- How to make different urls for some tags pages
- Multiple URL rewrite rules and get every prams
- “post-name” Renders Using page.php, but “post-name-2” renders with single.php
- How can I get WordPress CPT archives and page templates to work with prettified permalink settings?
- Pages included in another page and duplicate content issues for SEO
- Permalink / sub-template issue
- Changing permalinks gives me 404 errors on nginx
- Move WordPress to subdirectory, keep ALL URLs
- ‘post_type_link’ filter not working
- Update URL Snippet to Canonical Permalink URL
- WordPress permalinks Yahoo hosting(no .htaccess allowed)
- How do I turn off 301 redirecting posts (not canonical)?
- Permalink: postname EXCEPT for blog
- %tag% in permalink not working
- Change website URL without breaking links or images? WP 3.3
- How to identifty post from its URL in 404 page?
- Rewrite rule never matching
- How to get blog id from permalink?
- Custom url for a single page
- Rewrite-Rules not working on a vhost, everything goes to index.php
- Rewrite URL for results of a custom WP_Query
- Using ‘Primary Category’ in URL
- template_include not loading -instead goes to index.php
- Changes to permalink structure results in 404 error for all pages other than home
- I need a custom permalink for my website
- How to link to “most recent” document in the Media Library?
- Permalinks not working
- Problem with wordpress links on a live site
- Need Help Correct Regular Expression Redirect Code
- Why wordpress multisite root site showing blog prefix by force?
- issue with setting up permalink programmatically
- changing permalink for custom template in posts of a certain category
- Force wordpress to display page with same url structure as categories
- is there a way to add the post URL to the results of fselect facet in Facetwp plugin?
- NGINX serve WordPress from sub-path fails with 404, how to fix?
- Redirect /%year%/%monthnum%/%day%/%postname% [closed]
- How to get the full URL of the current page and change domain of it?
- How to get functions.php work with postname permalink?
- WordPress always returning 404 page for a specific url
- Dynamic Custom Permalinks
- WordPress suddenly changed all links to example.com/example.com/
- Permalink for PDF of article
- How to link the title adding a permalink?
- Comment author url link is wrong? How to change from authors/ to author/
- rename ‘page’ URL fragment in pretty permalinks
- Can’t get permalinks working!
- Why can’t change the permalink of my page/post?
- Redirecting “wrong” but working links to their canonical URL in order to prevent search engine penalties (e.g. /123/ at the end of URLs)
- WordPress not generating .htaccess but tells me that (Permalink structure updated.)
- Direct link to post when multiple categories are selected
- Getting an ID from a URL, why can WP do this itself, but none of of the functions provided get it right?
- Ignore postname in permalink
- How do I keep multiple domain for my wordpress site
- how to set up wp in folder within static website?
- WordPress permanent links not working (the weird way)
- Permalink Structure not updating .htaccess
- Multiple sites with pretty permalinks with nginx
- How to enable %postname% permalinks on Mac?
- How do I rewrite attachment urls when permalink structure contains %category%?
- How to change URL from /%postname%/ to custom-name/%category%/%year%/%monthnum%/%day%/%postname%/
- WordPress Attachment Page URL Rewrite!
- Customize URL for specific tags archive
- Permalink prefix change
- why wordpress keeps redirecting to old page after deleting it?
- WordPress Multisite ABSPATH and get_home_path() to check for htaccess or web.config file
- Permalink structure /page/page/cpt-post gives 404 with pagination
- Changing permalink structure for Posts
- Rewrite posts url as they’re all children of a page
- Author permalink
- Multiple Permalink Patterns for one page
- WordPress permalinks first word title
- I can get the permalink or the excerpt to work correctly, but not both
- WordPress permalink issue on AWS
- Permalink Rewrite with Archive – Archive gets 404
- WP Admin Bar not showing with custom permalink structure for pages
- Link to most recent child page
- Automatic -1 suffix being added to the permalinks of a page when the page does not exist
- Why doesn’t WP update my .htaccess file?
- WordPress permalink still not working (error or not understood?)
- Permalink for pages
- How is a URL getting mapped to a page template
- Problem when i configure permalink
- Getting the top level permalink using get_post_ancestors()
- What is the issue with our links? It creates a loop
- Strip category base from URL?
- Does the error “A structure tag is required when using custom permalinks.” mean my permalinks haven’t saved?
- Error: “Sorry, this content could not be embedded” when using the Embed block
- WordPress Permalinks 404 Not Found
- WordPress 6.1.1 UTF8 Slug Limit Increase
- WordPress not remembering old slugs for pages
- make a new structure tag that does some processing
- Website appears with wrong permalink in Google’s search