Adding dashicon fonts to the admin of pre 3.8 installs

This happens sometimes when the font is sent with a wrong MIME type. application/x-font-woff for example, is wrong. Try to add proper MIME types to your server configuration. In Apache, your can do that in a .htaccess: AddType image/svg+xml .svg AddType application/x-font-ttf .ttf AddType application/x-font-opentype .otf AddType application/vnd.ms-fontobject .eot AddType application/font-woff .woff You should add … Read more

Removing unnecessary wordpress files

If you don’t use any 3rd services such as XMLRPC | REST API | oEmbed | Windows Live Writer, removing those lines/headers doesn’t affect anything to your site. Those lines of code is the best way to archive what you want. To remove xmlrpc.php?rds, you need another line: remove_action(‘wp_head’, ‘rsd_link’); Put all of them in … Read more

Displaying wp menus by name without using theme locations

Umm u can do that easily. And this is the way I do how i register my menu in functions.php add_action(‘init’, ‘register_custom_menu’); function register_custom_menu() { register_nav_menu(‘custom_menu’, __(‘Custom Menu’)); } Then in ur admin panel u create different menu by ur desired name. And get the menu where ever u want like this. EX:- if I … Read more

Translate third party plugin and save translation files in custom theme

First of all, I’d strongly recommend against storing translations for a plug-in in your theme. It has no reason to be there, and you’ll loose the translations when you change/update the theme. The correct place to store translations is wp-content/languages/plugins/. This code does that, and targets the domain ‘other_plugin’: function wpse159536_override_mofile_path( $mofile, $domain ){ if( … Read more