最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin1浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论