Skip to content

Instantly share code, notes, and snippets.

Henning Orth E-VANCE

Block or report user

Report or block E-VANCE

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View matomo.yml
# group_vars/{staging & production}/wordpress_sites.yml
[...]
wordpress_sites:
example.com:
site_hosts: [...]
[...]
matomo:
db:
user: matomo
host: localhost
@E-VANCE
E-VANCE / acf-basic.php
Last active Apr 17, 2018
ACF Builder (Basic fields)
View acf-basic.php
<?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',
@E-VANCE
E-VANCE / acf-home.php
Last active Apr 17, 2018
ACF Builder (Home fields)
View acf-home.php
<?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 / functions.php
Created Apr 5, 2018 — forked from infn8/functions.php
Wordpress Bootstrap Image Sizes
View functions.php
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-field-location-values.md
Last active Apr 5, 2018
ACF field location values
View acf-field-location-values.md

Post

  • post_type
  • post_template
  • post_status
  • post_format
  • post_category
  • post_taxonomy
  • post
@E-VANCE
E-VANCE / Movefile
Last active Aug 6, 2017
Example Movefile for Wordmove with SSH (VVV to DigitalOcean)
View Movefile
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"
View gist:3ca0a78e378c900e0b98cf61c8857a2c
<?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 / functions.php
Created Jun 16, 2016
Hide/Disable Yoast SEO's nagging display features in the WordPress backend
View functions.php
<?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');
}
@E-VANCE
E-VANCE / extras.php
Created Oct 30, 2015
JSON sitemap generation for use with UnCSS (+ Sage theme)
View extras.php
<?php
/**
* Generate JSON sitemap for use with UnCSS
*/
function show_sitemap() {
if (WP_ENV === 'development' && isset($_GET['show_sitemap'])) {
You can’t perform that action at this time.