-1

I am having an issue where post permalink always coming with the default structure.

My permalink setting is "http://domain.com/sample-post/" and but the post URL coming like this "http://domain.com/?p=16721".

Impostrant thing need to notice here that Page and other custom post type URL working absolutly fine.

Only having problem with default WordPress Post.

Please suggest me any solution.

  • What context is the post URL coming through with ?p=#? When you click "view" and are actually viewing the post as a visitor? Or when you are in wp-admin? Have permalinks ever worked, or is this a fairly new install that you have not gotten fully working yet? Have you tried using a different browser or fully clearing your cache? Have you tried disabling all plugins to see whether one of them might be adjusting things? – WebElaine Mar 21 '17 at 13:31
0

Are you using $post->guid or something like that? If so, then the GUID give you this kind of URL. Otherwise you can use get_the_permalink( $post_id )

  • I am first trying to view this from wordpress admin, wordpress admin also giving me same URL structure that's coming in the front end. That means the permalink structure changed everywhere. – user2504941 Mar 22 '17 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.