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
/* | |
* Modifying TinyMCE editor to remove unused items. | |
*/ | |
function wbvb_wpadmin_adjust_tinymce_options( $settings ) { | |
// remove pointless layout options: | |
$settings['theme_advanced_disable'] = 'underline,spellchecker,forecolor,justifyfull'; | |
$settings['theme_advanced_buttons2_add'] = 'styleselect'; |
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; |
OlderNewer