WordPress stores the page id for the privacy policy page in the options
table. To get the value, you can use:
$privacy_policy_page = get_option( 'wp_page_for_privacy_policy' );
if( $privacy_policy_page ) {
$permalink = esc_url( get_permalink( $privacy_policy_page ) );
}
The $privacy_policy_page
variable holds the ID of the privacy policy page.
Related Posts:
- Stop WordPress appending `-2` to the end of my url after i change it
- WordPress Permalinks not working in Apache2 Ubuntu 14.04
- How do I set a custom base URL for standard posts?
- Does WordPress Change the .htaccess File When Updating?
- Must slugs be unique?
- WooCommerce return 404 on category pages
- why does anchor name add a slash to url?
- the_title() and the_permalink() won’t work on AJAX calls
- What is the best practice to check for pretty permalinks?
- Subdomains to pages
- Redirect old permalinks to new permalinks
- Post ID At The End Of Permalink URL Effects Performance (Positively)?
- How to map permalinks with accented letters to sanitized slugs?
- Homepage loads but all permalinks are 404 when using nginx & PHP-FPM
- Why does WordPress Pagination Remove the Spaces from my GET Variable?
- Custom rewrite rules for a $_GET request
- How to increase the character limit for post name of 200?
- WordPress overrides the GET variables, (page_id) set in HTACCESS
- WordPress 3.4 Permalinks Redirection Problem
- Change permalink for a single post entry
- Apostrophe in permalink results in page not found
- WordPress redirection problem after moving to a new server?
- Is the ‘/category/post-name-date/’ permalink structure okay?
- Infinite redirects after changing the permalink of a page
- Permalinks settings page blank
- how to add two same slug under two category?
- Does changing a post title of a published post automatically change permalink?
- How to have extra permalink for posts
- Trouble with numeric permalinks after 4.3.1
- Editing Pages Give 404 Error After WordPress Upgrade in Admin Panel
- How to get post object on blog template
- Illegal characters in URLs
- conditional statement for active permalinks
- WordPress auto generates small medium and large of an image on upload, how can we guess their links?
- Error updating pages, and linking to pages (permalink error)
- Permalinks dropping after 3-4 weeks with no changes in theme or plugins
- WordPress Sub domain
- How can i have a custom post type with more slugs for each post?
- Create a PHP page to refresh the permalink on a custom table
- Why wordpress kicks me back to the dashboard of xampp? [closed]
- Custom permalink for specific category
- Permalink shows garbage character
- Rewrite rule intended for CPTs gives 404 for pages
- Permalink structure between 2 custom post types and a taxonomy
- how to redirect old blog post urls when permalinks are changed
- How to use all tags in post permalinks
- Disable date based archives for all categories except one
- Permalink options page corrupts web.config file
- Permalink target for recent post
- How do I reclaim either deleted pages or their permalinks?
- url rewrite .htaccess extension to permalink
- Remove parent page from url
- Remove “attachment/” from the URL of attachment pages
- How do I change the permalink structure without getting 404s?
- how to alter permalink in wordpress?
- Adding User Info to Permalink of User pages – is it neccessary?
- Permalink will not change – it wants to have -2 slug [duplicate]
- Permalinks 404 after Subdirectory to Root Migration
- How to get rid of an extra middle part my permalink
- optional parameter in permalink structure
- Get a link to paged() part?
- How Can I Use a Custom AccessFileName?
- Two custom taxonomies in permalink structure
- Blogger To WordPress Permalink Redirection
- get_permalink() gives a certain page link only. how to solve this.?
- replacing post ID by custom post name in url
- What is the simplest way to create a redirect
- Problem with special character WordPress
- How to make different urls for some tags pages
- Adding custom query var to a single post without redirecting to its root slug
- How to change specific permalink in wordpress site?
- assets aren’t loading on a page but loads on others? slug permalink conflict?
- remove SLASH on single_post but KEEP on categories and parent pages
- Fire a code when permalinks updated
- Change Project permalink to custom URL
- Got 404 error when changed siteurl via DB in WordPress
- I have a 404 error on all my pages! What do I do?
- All files in public_html, Cannot launch WordPress site via wp-admin
- Extra url paths as variable
- Permalinks don’t update nor link properly
- Prevent 301 when a trailing slash added
- Why I had to re-save permalink setting after moving my WordPress site to another hosting provider?
- Permalinks custom base to redirect to archive.php
- How to change URL of my pages?
- get_permalink to an anchor
- Pretty permalinks returning “not found” on localhost and server
- Removing or hiding slug/permalink from htaccess
- WordPress Permalink Problem
- Converting WP Page to use full explicit paths?
- Add Custom Pagination Permalink
- Pages included in another page and duplicate content issues for SEO
- Update permalinks
- Losing the original URL when using add_rewrite_rule
- URL to an image in a post is changing when permalink is set to custom. Can I avoid this?
- Permalink issues with Ubuntu Server – Infinite loop & Wrong pages
- How can i edit all posts slug in bulk keeping WP native redirect?
- Post/page without slug
- Blog url disappears
- Standard Htaccess directives disappear by themselves
- My permalinks no longer have the “news” category prefix in the link and it’s causing 404 errors for articles published on the web