admin管理员组

文章数量:1415467

This is my permalink structure

/%post_id%-%postname%/

/

/

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

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

When using url_to_postid(), this format is working /, but not this

/

For example:

url_to_postid('/');

any solution to handle with post id?

url_to_postid('/[%post_id%-]test-post/');
url_to_postid('/[\d\-]+test-post/');

Thanks in advance.

本文标签: How to check a post exist when the permalink has post id in it