View analytics code via child theme.php
<?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> |
View .gitignore
# ----------------------------------------------------------------- | |
# .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. |
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; } | |
</style>'; | |
} | |
add_action('admin_head', 'wp_admin_dashboard_header_colour'); |