Archive for the ‘WordPress’ Category

To access your WordPress administration panel, you will (in most cases) go to the main page of your blog and add “wp-admin” at the end of the URL in your web browser.

For example: http://www.yourdomain.com/blog/wp-admin/

If your entire site is managed by WordPress, it is often: http://www.yourdomain.com/wp-admin

Add Google Analytics code to the footer.php file in WordPress by adding the code below into /wp-content/themes/yourtheme/functions.php. Don’t forget to to replace the “UA-123456-1” with your actual GA code.

// add google analytics to footer function add_google_analytics() { echo '<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>'; echo '<script type="text/javascript">'; echo 'var pageTracker = _gat._getTracker("UA-XXXXX-X");'; echo 'pageTracker._trackPageview();'; echo '</script>'; } add_action('wp_footer', 'add_google_analytics');

Currently, this function is using the newer “ga.js” tracking code. You may want to check out Google Analytics Tracking Code Migration Guide options and modify the code accordingly.

There is a lengthy discussion about removing extra line breaks in WordPress. If you find that breaks (<br />) are being added to your posts then look at /wp-includes/formatting.php (function wpautop – line 135) and change the $br to = ’0′ or ‘false’.

function wpautop($pee, $br = 1) {
and changed to:
function wpautop($pee, $br = false) {

And vuala, the extra line breaks are gone!