Type: php
Religion Profile Page – calculate PG and Pop counts
function get_total_religion_rows() { global $wpdb; $table_name = “people_groups”; $param = get_field(‘ror’); // Gets the ACF field ‘ror’ from the current post if (!$param) { return ‘No ROR value found.’; } return number_format($wpdb->get_var($wpdb->prepare(“SELECT COUNT(*) FROM $table_name WHERE ROR = %s”, $param)));…Continue reading
Untitled Snippet
google-site-verification=-jISe-Oe0cpvoUkE-I-AlGEIAzjdaSC50PUnVdPH7BYContinue reading
Untitled Snippet
if (function_exists(‘asl_display’)) { echo do_shortcode(‘[ajax_search_form]’); }Continue reading
Automatische updates naar standaard
/** * Activeer alle automatische updates (globaal), * met correcte visuele weergave en standaard WordPress instellingen. */ if ( ! defined( ‘ABSPATH’ ) ) exit; /** * Hulpfunctie: check of huidige gebruiker een Pixelsz beheerder is */ function pixelsz_is_beheerder() :…Continue reading
Redirect Mobile URLs on Desktop
// This snippet ONLY runs on DESKTOP devices. // It checks if the user is on a mobile page and sends them to the desktop version. add_action( ‘template_redirect’, function() { // — Define your page pairs — // ‘desktop_page_slug’ =>…Continue reading
wwr parallax 2
add_action(‘wp_footer’, function () { ?>Continue reading
wwr parallax
Completely Disable Comments
add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading
QB
add_action(‘wp_footer’, function() { if (is_admin()) return; echo ‘ ‘; });Continue reading