How to check a post exist when the permalink has post id in it?

This is my permalink structure

/%post_id%-%postname%/

https://example.com/in/140521-test-post/

https://example.com/us/140524-second-post/

How can I check test-post exist or not? I’m using wpml for multi language so not able to checking using slug.

Post ID is causing issues while checking. Is there any solution for this?

This format is working

https://example.com/in/test-post/, but not this

https://example.com/in/140521-test-post/

Thanks in advance.

Read more here:: How to check a post exist when the permalink has post id in it?

Leave a Reply

Your email address will not be published. Required fields are marked *