Skip to content

Instantly share code, notes, and snippets.

View mattrock1's full-sized avatar

Matt Rock mattrock1

View GitHub Profile
@salcode
salcode / .gitignore
Last active April 3, 2024 18:38
Please see https://salferrarello.com/wordpress-gitignore/ 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)
# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20180808
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore
# 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.
<?php
/* Add Google analytics code to wp_head */
add_filter('wp_head','add_analytics_to_wphead',15);
function add_analytics_to_wphead(){
?>
<script>
//analytics or tag manager code
</script>
@tjhole
tjhole / WORDPRESS: Hide ACF by CSS in Admin Area
Created November 29, 2013 15:32
WORDPRESS: Hide ACF via 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; }
</style>';
}
add_action('admin_head', 'wp_admin_dashboard_header_colour');