Skip to content

Introduction

This Jussi's private notepad on things technical. Hope it helps someone else, too.

(This text is shown with the aid of blog introduction plugin without touching the theme files.)

WordPress Cookie Domain

01-Mar-10

Set WordPress cookie domain in wp-config.php.

define('COOKIE_DOMAIN', 'www.yoursite.com');

Google Browser Size Overlay div png

01-Mar-10

Google Browser Size is a valuable tool but sometimes you'd only need the overlay image (say, when your site is not publicly available). Overlay PNG is available at http://browsersize.googlelabs.com/static/2009-11-18-day_google_com_100.png.

Disable Quotation Mark Modifications from WordPress

10-Feb-10

Remove automatic modification of quotation marks (e.g. " to opening and closing quotation marks) by entering the following 4 lines to the functions.php file of your theme.

remove_filter('the_content', 'wptexturize');
remove_filter('the_title', 'wptexturize');
remove_filter('the_excerpt', 'wptexturize');
remove_filter('comment_text', 'wptexturize');

As the code says, it removes the wptexturize filter, which does other things as well, e.g. changes double dashes (--) to — characters, so unfortunately you'll lose those features too.

301 Redirect [PHP]

03-Feb-10

<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.example.com/new-url/");

Done. PHP 301 redirect is now rolling in given directory once you put that, say, in a file named index.php.

JavaScript to Footer in WordPress

20-Jan-10

Want to move that jQuery and other js references from header to footer? Try JavaScript to Footer plugin.