SearchWP

This Documentation is for SearchWP Version 3

Available since: 2.8.16

searchwp_query_allow_query_string_override_orderby

View Parameters »

By default SearchWP accepts an orderby query string parameter. There is a restricted list of accepted parameters:

  • title

If you would like to prevent SearchWP from accepting an orderby query parameter you can use this hook like so:

<?php
// Prevent SearchWP from accepting an orderby query parameter.
add_filter( 'searchwp_query_allow_query_string_override_orderby', '__return_false' );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$allow_override Boolean

Whether a query parameter is considered

[wpforms id="3080"]