WPDev.one
Core Function
View Source on Trac ↗

remove_query_arg()

remove_query_arg( mixed $key, mixed $query = false )

Removes an item or items from a query string.

Parameters 2 required

Name / Type Description
(string

| string[]) $key Query key or keys to remove.

Required
(false

| string) $query Optional. When false uses the current URL. Default false.

Required

Return Value

(string)
New URL query string.

Function Information

Since Version
1.5.0
Source File
wp-includes/functions.php
Advertisement