Skip to content

Instantly share code, notes, and snippets.

View vanderwijk's full-sized avatar

Johan van der Wijk vanderwijk

View GitHub Profile
@zytzagoo
zytzagoo / disable-yoast-notification-center.php
Last active September 19, 2023 18:14
Disable annoying Yoast SEO admin notifications
<?php
add_action( 'admin_init', function() {
if ( class_exists( 'Yoast_Notification_Center' ) ) {
$yoast_nc = Yoast_Notification_Center::get();
remove_action( 'admin_notices', array( $yoast_nc, 'display_notifications' ) );
remove_action( 'all_admin_notices', array( $yoast_nc, 'display_notifications' ) );
}
});
@danielpataki
danielpataki / category.php
Last active December 1, 2015 19:42
Post Filtering
global $wp_query;
$modifications = array();
if( !empty( $_GET['catname'] ) ) {
$modifications['category_name'] = $_GET['catname'];
}
$args = array_merge(
$wp_query->query_vars,
$modifications
);
@helen
helen / repeatable-fields-metabox.php
Created January 11, 2012 04:42
Repeating Custom Fields in a Metabox
<?
/**
* Repeatable Custom Fields in a Metabox
* Author: Helen Hou-Sandi
*
* From a bespoke system, so currently not modular - will fix soon
* Note that this particular metadata is saved as one multidimensional array (serialized)
*/
function hhs_get_sample_options() {