How to remove "post_format" parameter from preview url
-
I recently ran into a problem of preview links not working (getting a 404 or page not found message). Went through all the usual suspects and couldn’t find a solution. I came across this support ticket and tested it on my site. Removing the post_format parameter from the preview url fixed the problem unfortunately, removing the post format support was not an option for me. I just needed to remove it from the preview url.
Long story short, I put this function in my theme to do just that. Hope some of you find it useful:function post_format_parameter( $url ) { $url = remove_query_arg( 'post_format', $url ); return $url; } add_filter( 'preview_post_link', 'post_format_parameter', 9999 );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to remove "post_format" parameter from preview url’ is closed to new replies.