Skip to content

Instantly share code, notes, and snippets.

@fazlurr
fazlurr / WP_Query_Args.php
Last active July 18, 2024 20:12 — forked from billerickson/gist:3698476
WP_Query arguments list
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@zackpyle
zackpyle / acf-numbers-with-commas.php
Last active May 30, 2024 20:25
Format ACF Number fields with Commas on the Frontend #acf
<?php
// Return ACF Number Fields Formatted with Commas on the Frontend
add_filter('acf/format_value/name=ACF_FIELD_NAME', 'acf_number_comma', 20, 3);
add_filter('acf/format_value/name=ANOTHER_ACF_FIELD_NAME', 'acf_number_comma_decimal', 20, 3);
// Without Decimal
function acf_number_comma($value, $post_id, $field) {
$value = number_format(floatval($value));
return $value;