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
remove_action( 'wp_head', 'feed_links', 2 ); |
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
@include keyframe(fadeout) { | |
0% { | |
opacity: 1; | |
} | |
100% { | |
opacity: 0; | |
} | |
} |
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
/* ADD PAGE SELECT FIELD */ | |
function metabox_page_select_field( $field, $meta ) { | |
$args = array( | |
'depth' => 0, | |
'child_of' => 0, | |
'selected' => $meta, | |
'echo' => 1, | |
'name' => $field['id'] | |
); | |
wp_dropdown_pages($args); |
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( 'wp_enqueue_scripts', 'enqueue_my_styles' ); | |
function enqueue_my_styles() { | |
global $wp_styles; | |
// Load the main stylesheet | |
wp_enqueue_style( 'my-theme', get_template_directory_uri() . '/style.css' ); |
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 add_html_pages_permalink() { | |
global $wp_rewrite; | |
if ( !strpos($wp_rewrite->get_page_permastruct(), ".html")){ | |
$wp_rewrite->page_structure = $wp_rewrite->page_structure . ".html"; $wp_rewrite->flush_rules(); | |
} | |
}//end add_html_pages_permalink | |
add_action('init', 'add_html_pages_permalink', -1); | |
function add_html_pages_no_page_slash($string, $type){ | |
global $wp_rewrite; |
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 | |
/* ========== 301 REDIRECTS ========== */ | |
function my_wordpress_301_redirects() { | |
/* Bail if on the front page */ | |
if( is_front_page() ) | |
return; | |
$redirect_pages = array( | |
/* Pass a string to redirect to a new page */ | |
'slug1' => 'new-slug1', | |
'slug2' => 'new-slug2', |
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
$slug = array_pop(array_filter(explode('/', $_SERVER["REQUEST_URI"]))); |
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
@mixin boxit ($dir) { | |
display:box; | |
display:-moz-box; | |
display:-webkit-box; | |
box-orient:$dir; | |
-moz-box-orient:$dir; | |
-webkit-box-orient:$dir; | |
} | |
@mixin order ($num) { |
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
//remove wpautop from content | |
remove_filter( 'the_content', 'wpautop' ); | |
//add wpautop back to content after shortcodes are processed | |
add_filter( 'the_content', 'wpautop' , 99); |
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 | |
if ( ! function_exists( 'shortcode_exists' ) ) : | |
/** | |
* Check if a shortcode is registered in WordPress. | |
* | |
* Examples: shortcode_exists( 'caption' ) - will return true. | |
* shortcode_exists( 'blah' ) - will return false. | |
*/ | |
function shortcode_exists( $shortcode = false ) { | |
global $shortcode_tags; |