@font-face doesn’t work

This article has some very helpful information regarding @font-face, and compatibility issues … just in case. Here are some potential improvements in your @font-face section: One of your src entries lists “local”. Try removing that. Try using explicit addressing for your files. Make sure you can actually open your font files, or at least do … Read more

Big side banners

Register sidebars for the banners, then use the text widget to place your code in it. The default widget will strip some HTML code, so you may want to use something less invasive like my Unfiltered Text Widget.

How do I load custom scripts and styles for a page?

Yes, you may add conditional tags to the wp_enqueue_scripts action. See the examples below: function load_assets() { wp_enqueue_style( ‘styles’, get_template_directory_uri() . ‘/css/styles.css’); // loads on any ‘page’ post type if( is_page() ){ wp_enqueue_script(‘main-js’, get_template_directory_uri() . ‘/js/main.js’); } // only loads on the page with a slug of ‘home’ if( is_page(‘home’) ){ wp_enqueue_script(‘home-js’, get_template_directory_uri() . ‘/js/home.js’); … Read more

Performance and styles not working fine after changing permalink structure

Your .htaccess should not be modified on the WordPress part, so it should always be: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress It looks like if you have your WordPress install in a Subdirectory of … Read more

Adding inline styles from a widget

Got it. So here’s how you insert a hover state halfway the processing of a page without violating the w3c rules. This is the code you don’t want your widget to produce: <div class=”mywidget”> <style>.mywidget a {color:red}, . mywidget a:hover {color:blue;}</style> <a>Link</a> </div> The following validates and is fairly elegant. In your widget generate the … Read more