Skip to content

Instantly share code, notes, and snippets.

View andreawetzel's full-sized avatar

Andrea Roenning andreawetzel

View GitHub Profile
@andreawetzel
andreawetzel / webpack.config.js
Created April 11, 2024 17:22
custom wordpress webpack config
/**
* Adds Webpack entry points for customizations to core blocks
* in addition to wp-scripts deafault configs that are used for custom blocks
*/
/**
* External dependencies
*/
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
@andreawetzel
andreawetzel / cpt-nested.php
Last active February 10, 2022 02:34
CPT Plugin
<?php
/*
Plugin Name: WI Verbs Nested Post Types
Plugin URI: https://wisconsinverbs.com
Description: Display Custom Post Types in a nested menu
Version: 1.0
Author: Andrea Roenning
Author URI: https://andrearoenning.com
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@andreawetzel
andreawetzel / shortcode-template.php
Created March 16, 2017 19:04
WordPress Shortcodes for Template Parts
/*
* Add shortcode support for template parts
* Example: [template_part path="template-part-leadership"]
*/
function template_part( $atts, $content = null ){
$tp_atts = shortcode_atts(array(
'path' => null,
), $atts);
ob_start();
@andreawetzel
andreawetzel / wetzel-gulp-sass.md
Last active December 3, 2021 15:36
Simple Gulp Starter File for Sass

Gulp Starter

var gulp        = require('gulp');
var browserSync = require('browser-sync').create();
var reload      = browserSync.reload;
var sass        = require('gulp-sass')(require('sass'));
var maps        = require('gulp-sourcemaps');
var postcss     = require('gulp-postcss');
var autoprefix  = require('autoprefixer');