Title: Query based on custom table
Last modified: August 20, 2016

---

# Query based on custom table

 *  [Michiel](https://wordpress.org/support/users/michiel/)
 * (@michiel)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/query-based-on-custom-table/)
 * HI!
 * I am wondering is it possible to create a conditional tag for a custom database
   table generated by “Page Security by Contexture”, that way I can show the Page
   in the Menu to users who belong in the group that have access.
 * I tried:
 * in_array(‘custom user role group’, $GLOBALS[‘wp_ps_groups’]->group_title)
 * -custom user role group: name of the group that has access to a page
    – wp_ps_groups:
   the database table – group_title: column inside wp_ps_groups containing the groups
 * Would be great if this is possible :)! Thank you in advance!!
 * [http://wordpress.org/extend/plugins/menu-items-visibility-control/](http://wordpress.org/extend/plugins/menu-items-visibility-control/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [shazdeh](https://wordpress.org/support/users/shazdeh/)
 * (@shazdeh)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/query-based-on-custom-table/#post-3486200)
 * Hi,
    try writing a custom function for that and then use that function for the
   visibility option. It would be cleaner and easier to manage.

Viewing 1 replies (of 1 total)

The topic ‘Query based on custom table’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/menu-items-visibility-control.svg)
 * [Menu Item Visibility Control](https://wordpress.org/plugins/menu-items-visibility-control/)
 * [Support Threads](https://wordpress.org/support/plugin/menu-items-visibility-control/)
 * [Active Topics](https://wordpress.org/support/plugin/menu-items-visibility-control/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/menu-items-visibility-control/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/menu-items-visibility-control/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [shazdeh](https://wordpress.org/support/users/shazdeh/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/query-based-on-custom-table/#post-3486200)
 * Status: not resolved