---
title: "Conditional Functions"
source: "https://docs.nexcess.com/software/give/conditional-functions/"
description: "GiveWP provides several useful conditional functions to allow developers to more easily extend or customize their websites with GiveWP."
vertical: "Software"
area: "Give"
date: "2016-08-02"
last_modified: "2016-08-02"
---

# Conditional Functions

GiveWP provides several useful conditional functions to allow developers to more easily extend or customize their websites with GiveWP.

**NOTE:** These functions are only available in GiveWP Core version 1.6+

## is\_give\_form()

Returns true if the visitor is currently viewing a single GiveWP form page. Note that this functions will not return true within a GiveWP widget or shortcode is used in other posts/pages.

**Return**

(bool) True when viewing single GiveWP form, false otherwise.

**Example usage**

Adds a unique Body class to all single GiveWP form pages

## is\_give\_category()

Returns true if the visitor is currently viewing a GiveWP category page. When left blank it will apply to any category page. The term can also be defined in the function.

**Parameter**

$term (string) The category term slug. Default is blank.

**Return**

(bool) True when viewing GiveWP form category archive, false otherwise.

**Example usage**

Enqueues a script only on the GiveWP category page with the term “youth”.

## is\_give\_tag()

Returns true if the visitor is currently viewing a GiveWP tag page. When left blank it will apply to any tag page. The term can also be defined in the function.

**Parameter**

$term (string) The tag term slug. Default is blank.

**Return**

(bool) True when viewing GiveWP form tag archive, false otherwise.

**Example usage**

Enqueues a script only on the GiveWP tag page with the term “annual”.

## is\_give\_taxonomy()

Returns true if the visitor is currently viewing a page which is any GiveWP taxonomy. This could be a category, or a tag, or even if you’ve created your own additional taxonomy for GiveWP.

**Return**

(bool) True when viewing GiveWP form taxonomy archive, false otherwise.

**Example usage**

Enqueues a script for any GiveWP taxonomy page.
