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