I'm a beginner in Wordpress Plugin development. I want to write a Plugin for a Member Part on my Page. I know, that Plugins for this Problem available, but i want to create an own Plugin ;)
I want to create a table in the database, who looks like:
ID | PostID | MemberOnly
So, i'm searching for an filter or an action, which i can use. Up to this point, i found the filter "the_content", but i don't get the post_ID or have i overlooked something? Another action, which i found is pre_get_posts. But here are the same Problem, with the Post_ID
Anyone an idea?
Edit: I need a possibility, where i can check the login status of the user. When i visit a page, my plugin have to check, is the visitor a guest or a logged in user. Which filter/action can i use to realize them.
Edit 2: I want to write a Plugin for a Member Area. For Sport Clubs for example. This Member have no access to the Admin Area in the Wordpress Backend. It should be an own Area. Nothing edit, only view.
In Frontend should be a Point "Only for Members". When you click on this, you see a login form (except you're logged in, then you see content). In this area you can see News ONLY for Member in this Sports Club.
So, i'm searching for an action or filter, what i can use to check, is this user logged in. When not -> go to login form -> when true -> see content
Edit 3: It should be a complete independent Member Area and uncoupled from the wp admin Members.