Skip to content

Instantly share code, notes, and snippets.

View E-VANCE's full-sized avatar
🌳
Huggin'

Henning Orth E-VANCE

🌳
Huggin'
View GitHub Profile
@E-VANCE
E-VANCE / extras.php
Created October 30, 2015 16:40
JSON sitemap generation for use with UnCSS (+ Sage theme)
<?php
/**
* Generate JSON sitemap for use with UnCSS
*/
function show_sitemap() {
if (WP_ENV === 'development' && isset($_GET['show_sitemap'])) {
@E-VANCE
E-VANCE / functions.php
Created June 16, 2016 09:33
Hide/Disable Yoast SEO's nagging display features in the WordPress backend
<?php
/**
* Disable Yoast SEO's darn admin bar icon
*/
function yoast_hide_admin_bar() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wpseo-menu');
}
<?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(
@E-VANCE
E-VANCE / Movefile
Last active August 6, 2017 10:18
Example Movefile for Wordmove with SSH (VVV to DigitalOcean)
global:
sql_adapter: "default"
local:
vhost: "http://PROJECT.dev"
wordpress_path: "/srv/www/PROJECT/htdocs" # use an absolute path here
database:
name: "PROJECT_DB_NAME"
user: "external"
@E-VANCE
E-VANCE / acf-field-location-values.md
Last active April 5, 2018 13:32
ACF field location values

Post

  • post_type
  • post_template
  • post_status
  • post_format
  • post_category
  • post_taxonomy
  • post
@E-VANCE
E-VANCE / functions.php
Created April 5, 2018 11:11 — forked from infn8/functions.php
Wordpress Bootstrap Image Sizes
function add_theme_features() {
// Add Image Sizes
$containerLG = 1170; // Change this if you have updated the largest bootstrap container width.
for ($i=1; $i <= 12; $i++) {
add_image_size(
'col-lg-'.$i,
ceil($containerLG / 12 * $i),
ceil($containerLG / 12 * $i) * 10,
false
);
@E-VANCE
E-VANCE / acf-home.php
Last active August 1, 2021 17:05
ACF Builder (Home fields)
<?php
/**
* HOME -- Slider
*/
$home_slider = new FieldsBuilder('home_slider');
$home_slider
->addRepeater('slider', ['min' => 1, 'max' => 5, 'layout' => 'table'])
->addImage('image')
->addText('title', [
@E-VANCE
E-VANCE / acf-basic.php
Last active December 14, 2019 08:28
ACF Builder (Basic fields)
<?php
/**
* BASIC -- Header image
*/
$basic_page_header = new FieldsBuilder('basic_page_header');
$basic_page_header
->addImage('page_header_background_image')
->addText('page_header_title', [
'instructions' => 'Leave empty to use the site title / name',
# group_vars/{staging & production}/wordpress_sites.yml
[...]
wordpress_sites:
example.com:
site_hosts: [...]
[...]
matomo:
db:
user: matomo
host: localhost
@E-VANCE
E-VANCE / animejs-random-covers.markdown
Created March 25, 2020 14:04
animeJS Random Covers