Skip to content

Instantly share code, notes, and snippets.

View benjaminthedev's full-sized avatar
🏠
Working from home

Benjamin Dordoigne benjaminthedev

🏠
Working from home
View GitHub Profile
@mgibbs189
mgibbs189 / functions.php
Created October 9, 2020 15:10
FacetWP - ignore any query using "showposts"
<?php
// Add to your (child) theme's functions.php
add_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) {
if ( false !== $query->get( 'showposts', false ) ) {
$is_main_query = false;
}
return $is_main_query;
}, 10, 2 );
@yaronguez
yaronguez / ACF Country List
Created February 17, 2015 01:37
Country list formatted for Advanced Custom Fields select dropdown
afghanistan : Afghanistan
albania : Albania
algeria : Algeria
american_samoa : American Samoa
andorra : Andorra
angola : Angola
anguilla : Anguilla
antigua_and_barbuda : Antigua and Barbuda
argentina : Argentina
armenia : Armenia