Title: Checking URL part or parameter
Last modified: March 26, 2021

---

# Checking URL part or parameter

 *  [Christian Leuenberg](https://wordpress.org/support/users/cleuenberg/)
 * (@cleuenberg)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/checking-url-part-or-parameter/)
 * Thanks for the plugin! Is there any chance to implement testing against some 
   other URL parts or parameter? While using pagination function that comes along
   with the Advanced Post module from “Ultimate Addons for Beaver Builder” (UABB),
   the pagination is suffixed with a number (e.g. “paged-2”). So the standard check
   for being on a paginated site (“paged”) does not work in this case.

Viewing 1 replies (of 1 total)

 *  Thread Starter [Christian Leuenberg](https://wordpress.org/support/users/cleuenberg/)
 * (@cleuenberg)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/checking-url-part-or-parameter/#post-14403370)
 * Hey [@sethstevenson](https://wordpress.org/support/users/sethstevenson/), I made
   some changes in your plugin code to get my feature request done. Would you be
   so kind to consider this for an update of your plugin?
 * added to **rules.js**:
 *     ```
       // URL
       addRuleType( 'extra-conditional-logic-for-bb/url', {
           label: __( 'URL Fragment' ),
           category: 'browser',
           form: {
               operator: {
                   type: 'operator',
                   operators: [
                       'equals',
                       'does_not_equal',
                       'starts_with',
                       'ends_with',
                       'contains',
                       'does_not_contain',
                   ],
               },
               value: {
                   type: 'text',
                   defaultValue: '/',
               },
           },
       });
       ```
   
 * added to **rules.php**:
 * `'extra-conditional-logic-for-bb/url' => array($this, 'url_evaluation'), //as
   a new rule, line 18`
 *     ```
       /**
        * URL Evaluation
        *
        * @param [type] $rule
        * @return void
        * @since 1.0.1
        */
       public function url_evaluation( $rule ) {
   
       	$url = $_SERVER['REQUEST_URI'];
   
       	// Evaluate the rule compared to the current page and return a boolean
       	return BB_Logic_Rules::evaluate_rule( array(
       		'value' => $url,
       		'operator' => $rule->operator,
       		'compare' => $rule->value,
       	) );
       }
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Checking URL part or parameter’ is closed to new replies.

 * ![](https://ps.w.org/bb-extra-conditional-logic/assets/icon.svg?rev=2258182)
 * [Extra Conditional Logic for Beaver Builder](https://wordpress.org/plugins/bb-extra-conditional-logic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bb-extra-conditional-logic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bb-extra-conditional-logic/)
 * [Active Topics](https://wordpress.org/support/plugin/bb-extra-conditional-logic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bb-extra-conditional-logic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bb-extra-conditional-logic/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Christian Leuenberg](https://wordpress.org/support/users/cleuenberg/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/checking-url-part-or-parameter/#post-14403370)
 * Status: not resolved