Author Topic: Redirect to another page  (Read 892 times)


  • Newbie
  • *
  • Posts: 15
Redirect to another page
« on: May 20, 2016, 03:36:23 pm »
I would like to prevent users from accessing certain pages such as "Item Post". I have this disabled in settings for users which are not logged in, however I would also like to block it for users with account type "b_company 0". When a not logged in user tries to access "index.php?page=item&action=item_add", it redirects them to the login page with the message "Only registered users are allowed to post listings". I would like to do the same for users with account type "b_company 0" but redirect them to the index page and display a notification message the same way.

I'm using the Glider theme and have been looking through all the different item related files (item.php, item-post.php, etc) but I cannot find the code where it performs the check/redirect. I want to do this from my own plugin rather than modifying the theme files, can anyone help point out where this snippet of code is within the theme?