Title: Query Parameter
Last modified: August 2, 2020

---

# Query Parameter

 *  Resolved [pgiesin](https://wordpress.org/support/users/pgiesin/)
 * (@pgiesin)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/query-parameter-2/)
 * Hi! I am trying to hide/show a section based on the value of a query parameter.
   What is the best way to extract this parameter as part of the Content Visibility
   plugin?
 * Peter

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Jonathan Horowitz](https://wordpress.org/support/users/jhorowitz/)
 * (@jhorowitz)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/query-parameter-2/#post-13205834)
 * Hi [@pgiesin](https://wordpress.org/support/users/pgiesin/),
 * Try `isset( $_GET['q'] ) && $_GET['q'] === 'some value'` where q is the parameter
   name and some value is the value it must equal.
 *  [ununiform](https://wordpress.org/support/users/ununiform/)
 * (@ununiform)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/query-parameter-2/#post-13289587)
 * Hi,
 * I tried this and received “critical error on your website”.
 * My page was passed “?section=education”
 * I tried giving the visibility plugin the boolean of:
    isset( $_GET[‘section’])&&
   $_GET[‘section’] === ‘education’
 * Any thoughts?
 *  Plugin Author [Jonathan Horowitz](https://wordpress.org/support/users/jhorowitz/)
 * (@jhorowitz)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/query-parameter-2/#post-13290050)
 * Hi [@ununiform](https://wordpress.org/support/users/ununiform/),
 * No, that should be fine.
 * Try adding that into a custom function like this in functions.php:
 *     ```
       function my_theme_is_requested_section($section) {
         return isset( $_GET['section'] ) && $_GET['section'] === $section;
       } 
       ```
   
 * And calling it in the Content Visibility expression field as
    `my_theme_is_requested_section('
   education')`
 *  [ununiform](https://wordpress.org/support/users/ununiform/)
 * (@ununiform)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/query-parameter-2/#post-13295576)
 * Thank you. That definitely helped.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Query Parameter’ is closed to new replies.

 * ![](https://ps.w.org/content-visibility-for-divi-builder/assets/icon-256x256.
   png?rev=1359961)
 * [Content Visibility for Divi Builder](https://wordpress.org/plugins/content-visibility-for-divi-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-visibility-for-divi-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-visibility-for-divi-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/content-visibility-for-divi-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-visibility-for-divi-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-visibility-for-divi-builder/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [ununiform](https://wordpress.org/support/users/ununiform/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/query-parameter-2/#post-13295576)
 * Status: resolved