Skip to content

Instantly share code, notes, and snippets.

View TudorSfatosu's full-sized avatar
☢️

Chris Tudor TudorSfatosu

☢️
View GitHub Profile
@richardscholtens
richardscholtens / wp-hierarchical-taxonomy.php
Last active April 5, 2023 10:51 — forked from ciccarone/wp-hierarchical-taxonomy.php
Just a way to programmatically add hierarchical taxonomies in WordPress
// For one level deep Wordpress nested terms.
$taxonomy_term = 'example';
$related_terms = array(
__( 'Parent' ) => array(
__( 'Child 1' ),
__( 'Child 2' ),
),
__( 'Parent 2') => array(
@n7studios
n7studios / acf-blocks.php
Created December 14, 2018 16:01
Advanced Custom Fields: Registering Custom Gutenberg Blocks
<?php
/**
* Plugin Name: Advanced Custom Fields: Gutenberg Blocks
* Plugin URI: https://www.n7studios.co.uk
* Version: 1.0.0
* Author: n7 Studios
* Author URI: https://www.n7studios.co.uk
* Description: Example code to register Advanced Custom Field Groups as Blocks. Requires ACF 5.8+
*/
@ciccarone
ciccarone / wp-hierarchical-taxonomy.php
Last active April 5, 2023 11:12
Programmatically add hierarchical taxonomies in Wordpress
$taxonomy_term = 'example';
$related_terms = array(
__( 'Parent' ) => array(
__( 'Child 1' ),
__( 'Child 2' ),
),
__( 'Parent 2') => array(
__( 'Child 3' ),
__( 'Child 4' ),
@courtneymyers
courtneymyers / acf_modifications.php
Created February 28, 2018 18:36
Reduces initial height of Advanced Custom Fields WYSIWYG fields to 100px, and enables autoresizing of WYSIWYG field, as text is entered. Best practice would be to include this function in a site-specific plugin.
<?php
/*
* -----------------------------------------------------------------------------
* Advanced Custom Fields Modifications
* -----------------------------------------------------------------------------
*/
function PREFIX_apply_acf_modifications() {
?>
<style>