Looking for the right hook
-
I’m REALLY new at making plugins. Let’s start there.
I’m looking to hide certain forums from a defined list of people. Or actually, I’m looking to only allow certain people to see certain forums. Anyway, I’m starting with just trying to make that happen on the front page. How do I “hijack” the page just at the point where it is about to spit out the forums on the front-page? I think this is what hooks are for right? So that I don’t need to actually edit my front-page.php?
Basically what I am looking to do, is during the “foreach” loop in front-page.php, I want to compare the upcoming forum_id with a list of usernames in an array who are allowed to see that forum. If there’s a match, it shows the forum, if not, it doesn’t.
The array looks like this:
$forum_restriction_keys = array(
"1" => "bob, sam, jim, jane",
"3" = > "bob",
);
So, to start, I need the right hook.
- You must be logged in to reply to this topic.