Skip to content

Instantly share code, notes, and snippets.


Matt Rock mattrock1

View GitHub Profile
View analytics code via child theme.php
/* Add Google analytics code to wp_head */
function add_analytics_to_wphead(){
//analytics or tag manager code
salcode / .gitignore
Last active Jan 26, 2021
Please see for the canonical version of this WordPress .gitignore file. Note: I do not receive notifications for comments here (because GitHub does not send notifications on Gists)
View .gitignore
# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20180808
# From the root of your project run
# curl -O
# to download this file
# By default all files are ignored. You'll need to whitelist
# any mu-plugins, plugins, or themes you want to include in the repo.
tjhole / WORDPRESS: Hide ACF by CSS in Admin Area
Created Nov 29, 2013
WORDPRESS: Hide ACF via CSS in admin area
View WORDPRESS: Hide ACF by CSS in Admin Area
// Editing the WordPress Dashboard Header
function wp_admin_dashboard_header_colour() {
echo '<style type="text/css">
#toplevel_page_edit-post_type-acf { display:none; }
add_action('admin_head', 'wp_admin_dashboard_header_colour');