This file contains hidden or 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
# Rewrite url with or without trailing slash, case insensitive | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule ^path/?$ /new/path/ [NC,L,R=301] | |
</IfModule> |
This file contains hidden or 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 | |
/** | |
* Modify Main Query | |
* | |
* Add multiple post types to main query. | |
* | |
* @param object $query main query object | |
* @return no return value necessary. | |
*/ | |
function _s_post_type_1_archive( $query ) { |
This file contains hidden or 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
<div class="addthis_sharing_toolbox"></div> |
This file contains hidden or 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 echo esc_url( add_query_arg( $wp->query_string, '', home_url( $wp->request ) ) ); ?> |
This file contains hidden or 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 | |
/** | |
* Remove Link When Adding Media | |
* | |
* Adding media to a WYSIWYG editor can sometimes automatically include a link | |
* to the file. This sets the default behavior for all users to none. | |
* | |
* @return void | |
*/ | |
function prefix_media_linking() { |
This file contains hidden or 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 Featured Image Description | |
* | |
* @param string $content Admin post thumbnail HTML markup. | |
* @param integer $content Post ID. | |
* @return string | |
*/ | |
function prefix_featured_image_description( $content, $post_id ) { |
This file contains hidden or 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
/** | |
* Set X-UA-Compatible for IE | |
* | |
* Sends headers to browser in an attempt to have IE render the website using | |
* their latest rendering engine (i.e. IE=edge). Additionally, attempts to | |
* activate Chrome Frame add-on if it exists. | |
* | |
* IE browser may show compatibility icon in address bar when using HTML5 Boilerplate's | |
* heading markup which contains conditional comments on HTML tag. | |
* |
This file contains hidden or 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 | |
/** | |
* Disable Emojis | |
* | |
* WordPress 4.2 introduced emoji JS and CSS in the page's head | |
*/ | |
function prefix_disable_emoji() { | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); |
This file contains hidden or 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 | |
/** | |
* Import Categories and Tags Into Post | |
* | |
* Using WP CSV to export blog posts, taxonomy fields include slug (e.g. term:Term, another-term:Another Term) | |
* This will exclude slug, returning only term's name | |
* | |
* Example Usage: [prefix_import_term_name({tx_category[1]})] | |
* [prefix_import_term_name({tx_post_tag[1]})] | |
* |
This file contains hidden or 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 | |
/** | |
* Hide Editor | |
*/ | |
function prefix_hide_editor() { | |
// get post id | |
if ( isset( $_GET['post'] ) ) : | |
$post_id = $_GET['post']; |
NewerOlder