admin管理员组文章数量:1202599
I am using CPT plugin to create new custom post type, and along with I am using elementor and jet smart filters to display list of posts in the frontend and filter them.
I am trying to filter out custom posts in the frontend based on the user role of the author.
But haven't figured out a way to achieve this.
The Idea is, I have a subscription website, where users have to pay for a yearly subscription create and submit posts. once the subscription is over and the user does not renew it then user role must change and the post shall not be visible in the frontend. And once he renews the post should be visible.
I have figured a way to change user role on subscription expiration (its with a plugin) but don't know how to query posts based on user role.
Kindly suggest a method.
There are similar questions but they are way too old to be referred to.
Thanks in advance for the support.
本文标签: pluginsFilter custom posts based on the user role of author
版权声明:本文标题:plugins - Filter custom posts based on the user role of author 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738652243a2104936.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论