Themes

How I choose and modify my themes

Replace A String With New String For All Posts In WordPress

Now WordPress is at version 3.9 and the new theme “Twenty Fourteen” is supposed to be the best free theme ever, but the theme does kill 2 of my plug-ins Mediabox Advanced and FancyBox 1.3.4. So, if I want to use Twenty Fourteen after I’m done modifying it, I have to replace the class strings

Speed Up The Web Page

PageSpeed Insights .htaccess (public)/wp Set time to expire at least 30 days. # BEGIN Expire headers <ifModule mod_expires.c> ExpiresActive On ExpiresDefault “access plus 5 seconds” ExpiresByType image/x-icon “access plus 2592000 seconds” ExpiresByType image/jpeg “access plus 2592000 seconds” ExpiresByType image/png “access plus 2592000 seconds” ExpiresByType image/gif “access plus 2592000 seconds” ExpiresByType application/x-shockwave-flash “access plus 2592000 seconds”

Working With Z-Index In CSS

In CSS, z-index is the order of appearance of one layer over the other, the higher the z-index the higher priority of the layer above the lower z-index displays. For example, on my theme, I made header to be fixed with z-index:9999 and my shadowbox overlay z-index:999 . So, on a small display like 1024×768,

IE8-9 Do Not Wrap Long Text CSS Fix

Our modified theme has problem with ie 8-9 as always, this time it’s the long text NOT wrapping inside the content body. add =” word-wrap: break-word;” or “word-break:break-all;”  in css at the content. .post_wrap { clear:right; } .post { float:right;width:88%; z-index:3; position:relative; } .post_content { background:#dfffdc; margin:0 38% 0 0; padding:20px 2%;color:#14000;font-size:.9em;word-wrap: break-word;} It’s fixed

Add Shortcodes To Sidebar

Since WordPress is php based, in order to use shortcodes on the sidebar or anywhere on the theme, we have to use echo. <h2><?php echo do_shortcode(‘ catlist categorypage=yes excerpt=yes excerpt_size =255)]’); ?></h2> This is the shortcodes for catlist to list related posts in the same category on the sidebar for my single.php that I’m designing