My workaround for this problem:
unset( $post->filter );
$url = get_permalink( $post );
Related Posts:
- Passing and retrieving query vars in wordpress
- Why is “/page/2/” not working?
- Get the post permalink within the loop but without additional DB query
- How to prevent redirect when using the term “page” in query string?
- How to get list of posts from permalinks?
- Why doesn’t my page know it’s a page (won’t return true for is_page())?
- Creating custom permalink structure for languages
- Permalink not working for page without title
- Make a WP Query search match exactly the search term
- pre_get_posts with get_posts
- Query Custom Meta Value with Increment
- Custom Rewrite with Query vars
- Change link to other post to shortlink in the editor
- Using only %postname%
- Finding the next 5 posts
- Rewriting permalinks with custom posts
- How to Modify Existing Rewrite Rules?
- Top level Pages redirecting to homepage!
- Specific URL Rewriting with parameters in wordpress
- Rewrite Page with a slug before page name
- Permalink settings not saving
- Is it possible to create a shortcode that will query a post based on taxonomies?
- What is considered a default query for the request filter?
- How to find exact match for search term in WP_Query? What is the additional string added in LIKE query in WP_Query?
- How to create thousands of endpoints for a post or a page or a custom post type programatically?
- AWS WordPress Install – pages/posts 404 on restart until updating permalinks
- How to add_rewrite_rule with two parameters to a single view page?
- Permalinks for parent/child pages and custom post types
- remove sub-category of Custom Post Type from permalink structure
- Optional Meta Query
- Set conditional on template based on referring page slug
- 404 Error Problems with sCategory Permalink plugin
- How to change wordpress category list url
- Redirect Uploads Folder to Query Vars in WordPress
- how to link post-thumbnail to original img in a lightbox?
- wordpress custom post type taxonomy permalink
- flush_rewrite_rules breaks permalinks
- Permalink for custom post type
- Change Permalink of attachment page
- date_query seems to be ignored by wp_query
- Update the permalink for one post via wp cli
- WooCommerce search products between price range using WP_Query
- How can I say if a URL is a post, page, or taxonomy archive?
- Is it possible to query from external database? [duplicate]
- Getting back a permalink from custom url
- how to get a list of all top level pages
- add_rewrite_rule on default post type
- how to find duplicated permalinks?
- Permalink sub-routing catch-all
- How do i get post thumbnail using attachment code
- Access posts while mod_rewrite is broken
- The requested URL was not found on this server [closed]
- Update page breaks permalinks
- How to create posts or pages with the names in wordpress?
- Multi-layered WP_Query
- `offset` WP_Query argument dont work via `pre_get_posts`
- Permalinks Question: Adding a prefix ONLY in front of the posts
- Pagination of custom page with custom fields query
- WP Query: If field X is empty, show posts based on field Y
- Xampp 7.3.3 fresh install of WordPress 404 pages unless permalink is set to plain
- Make the blog page a child of another page and rewrite the blog url
- WordPress slug confusion
- Extending page urls without getting a 404
- Author URL using wrong domain after using Edit Author Slug
- 404 on wordpress multisite Permalink pretty URLs
- Permalink conflict with React Router in subfolder
- 404 on pretty permalinks when serving via HTTPS
- Why does page for hierarchical taxonomy parent term go 404?
- Custom permalink gives 404 error only in some pages
- Can I link to content dynamically from a page to a new page?
- Question About Permalink in wordpress
- Create new URL structure for custom post types
- Meta query doesn’t remove placeholder escape before query
- No Ones Been Able to Override my WordPress Rewrite Rule Issue!
- Remove index.php from URL (WP installed in subdirectory)
- Page returns 404 for specific permalink
- issue with the_permalink
- Pagination links for taxonomy archive page 404 error on every page except first
- WooCommerce product permalink changed
- Facebook Share Permalink Javascript href
- Different Permastruck Between Ajax Request & Normal Request
- Links after changing hosting and domain
- Problem with multiple tags in URL
- Custom Permalinks and filters?
- How to organize a WP_Query’s list of posts by category and display category title?
- Query Posts From Multiple Post Types
- Displaying Results From Custom Taxonomy Query
- ?posts_type=xxx not rewritten
- 404 error on second page load for child-pages
- Permalink structure as code in back-end?
- Internal Server Error every time I push up my WordPress Project to Heroku
- Category pagination first link works, remaining don’t
- WordPress custom permalinks, pages are now 404
- WordPress home page showing 404 error
- AllowOveride All causes assetts and Admin Urls to 404
- Page permalinks are http but show up as https?
- WordPress 6.1.1 UTF8 Slug Limit Increase
- 301 Redirect posts to newly added categories
- How to have category/subcategory/posttitle/ permalinks?
- Permalink settings are stuck on https, will not update to http