This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function 404_page_title( $title, $id ) { | |
if( is_404() && !get_post_type( $id ) ) { | |
$title = 'Page not found'; | |
} | |
return $title; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'edit_form_after_title', 'posts_page_edit_form' ); | |
function posts_page_edit_form( $post ) { | |
$posts_page = get_option( 'page_for_posts' ); | |
if ( $posts_page === $post->ID ) { | |
// Running this hook seems to remove the page for posts notice, it's a good idea to keep it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'login_url', 'cameronjonesweb_use_woocommerce_login_page' ); | |
/** | |
* If WooCommerce is active use the account page for logging in | |
* @param string $login_url The URL for login. | |
* @param string $redirect The URL to redirect back to upon successful login. | |
* @param bool $force_reauth | |
* @return string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
# Replace example.com with the target domain | |
RewriteCond %{HTTP_HOST} !example.com$ [NC] | |
# Any paths you wish to exclude for some reason | |
RewriteCond %{REQUEST_URI} !^/training | |
# Preserve the path | |
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] | |
# All to the root | |
RewriteRule ^(.*)$ http://example.com/ [L,R=301] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType image/jpg "access plus 1 year" | |
ExpiresByType image/jpeg "access plus 1 year" | |
ExpiresByType image/gif "access plus 1 year" | |
ExpiresByType image/png "access plus 1 year" | |
ExpiresByType text/css "access plus 1 month" | |
ExpiresByType application/pdf "access plus 1 month" | |
ExpiresByType text/x-javascript "access plus 1 month" | |
ExpiresByType application/x-shockwave-flash "access plus 1 month" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<?php wp_head(); ?> | |
</head> | |
<body <?php body_class(); ?>> | |
<?php var_dump( have_posts() ); ?> | |
<?php wp_footer(); ?> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Spotify ad block | |
0.0.0.0 adclick.g.doublecklick.net | |
0.0.0.0 adeventtracker.spotify.com | |
0.0.0.0 ads-fa.spotify.com | |
0.0.0.0 analytics.spotify.com | |
0.0.0.0 audio2.spotify.com | |
0.0.0.0 b.scorecardresearch.com | |
0.0.0.0 bounceexchange.com | |
0.0.0.0 bs.serving-sys.com | |
0.0.0.0 content.bitsontherun.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<FilesMatch ".pdf$"> | |
Header set X-Robots-Tag "noindex" | |
</FilesMatch> |