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
/* THX: https://www.denisbouquet.com/remove-wordpress-emoji-code/ */ | |
//======================================================================================================== | |
// In functions.php (your WordPress theme) | |
// Add the following lines | |
// REMOVE WP EMOJI | |
remove_action('wp_head', 'print_emoji_detection_script', 7); | |
remove_action('wp_print_styles', 'print_emoji_styles'); |
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 a filter for Genesis framework post titles | |
add_filter( 'genesis_post_title_text', 'wbvb_example_use_seo_title', 15 ); | |
/** | |
* If a Yoast SEO title is found for a post, return this title after parsing 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
/** | |
* Retrieve a post ID for a slug and post type | |
*/ | |
function get_postid_by_slug( $page_slug = '', $posttype = 'post' ) { | |
if ( $page_slug ) { | |
$postobject = get_page_by_path( $page_slug, OBJECT, $posttype ); | |
if ( $postobject ) { | |
return $postobject->ID; |
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
// from: http://www.codeinwp.com/blog/wordpress-image-code-snippets/ | |
// ============================================================================ | |
// WordPress: Require Featured Image | |
// | |
// If you add the following code to your functions.php and try to publish a post that doesn’t have a featured image, | |
// you will receive the following message: “You must select a Featured Image before your Post can be published.” | |
// ============================================================================ | |
add_action('save_post', 'wpds_check_thumbnail'); | |
add_action('admin_notices', 'wpds_thumbnail_error'); |
OlderNewer