Monthly Archives: January 2012

WordPress Clear Line Theme – Previous Page Newer Posts

The WordPress Clear Line Theme has paginators at the bottom of pages, that have links to Previous Page and Next Page. Changing them to say something like Newer Posts and Older Posts is easy – you need to edit the following four files:

  • archive.php
  • author.php
  • index.php
  • search.php

In these files, search for the lines that look like:

posts_nav_link(' — ', __('« Previous Page'),...

Edit each file and change Previous Page to Newer Posts, and Next Page to Older Posts.

Alternatively if you’ve got ssh shell access (and you’re hosted on a Unix-like environment eg Linux), you can run the following commands:

cd /var/www/wp-content/themes/clear-line
sed -i 's/Previous Page/Newer Posts/' archive.php author.php index.php search.php
sed -i 's/Next Page/Older Posts/' archive.php author.php index.php search.php

Of course before running these sed commands you should backup your files, in case anything goes wrong…

WordPress Clear Line Theme – Hide Site Admin, Login, Entries RSS

The default settings in the WordPress Clearline Theme (and most WordPress themes) will display a box of settings containing things like “Site Admin”, “Login”, “Entries RSS”, etc. This is called the Meta Widget.

Unfortunately this Meta Widget can really distract from the visual quality of your site, and it’s a slight security risk (though hiding it won’t stop evildoers from working out that you’re running WordPress).

There’s a couple of options for hiding the Meta Widget:

  • don’t display it at all. Go to Appearance -> Widgets, find the Sidebar that Meta is being displayed in, and delete it. You can then login to your blog by going to the /wp-login.php page. For example if your blog is http://myblog.info, go to http://myblog.info/wp-login.php to login
  • make it smaller and barely visible (the option I prefer). First of all, go to Appearance -> Widgets and move/add a Meta Widget to the Footer Counters Sidebar (this Sidebar is specific to the Clearline Theme). Then, you need to edit the wp-includes/default-widgets.php file. Search for the line that contains wp_register (about line 293), then delete the three lines that contain ‘rss2_url’, ‘comments_rss2_url’, and ‘wordpress.org’, and remove the bulleting from ‘wp_loginout’. The changes are easier to see with some before and after code:

Before:

<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<li><a href="<?php bloginfo('rss2_url'); ?>" title=...
<li><a href="<?php bloginfo('comments_rss2_url'); ?...
<li><a href="http://wordpress.org/" title="<?php ec...
<?php wp_meta(); ?>
</ul>

After:

<ul>
<?php wp_register(); ?>
<?php wp_loginout(); ?>
<?php wp_meta(); ?>
</ul>

Now, you’ll have a small Login link at the bottom right-hand corner of your blog!

Addendum

If you take the second option (making the Meta Widget smaller and barely visible), you may have noticed you get a small “Site Admin” link when logged in (at the bottom right of the page). You can fix this by editing the wp-includes/general-template.php file. At about line 319, change:

$link = $before . '<a href="' . admin_url()...

to:

$link = '';

WordPress Clear Line Theme – Display Tags not Categories

The WordPress Clearline theme displays categories not tags for posts, and doesn’t have a way of modifying it’s behaviour through the settings area. This is easily fixed with a one line code change:

Edit the file /var/www/wp-content/themes/clear-line/functions.php, and at approximately line 340 replace:

<?php the_category(', '); ?>

with this:

<?php the_tags('', ', '); ?>

The path to the functions.php file may be slightly different on your server; you can quickly locate it using find:

find / -type f -name functions.php 2> /dev/null

More Balintawak Videos

I’ve added some more Balintawak Arnis videos to my Youtube page. They are edits of my training in the Philippines.

Some warmup drills:

And Groups 1, 2, and 3 of the Balintawak “Grouped Training System”:

Migrating from Palm to Android

My venerable Palm Treo 550 is showing it’s age (as is the company), so I’ve been looking for a new phone platform to migrate to for a few years. And since I’m now working for Google, Android is the obvious choice (dog-fooding and all that).

Some tricks and tools I’ve find useful in my migration from Palm to Android:

  • Synthesis SyncML clients are great for syncing to a SyncML server. Not $free like Funambol, but Synthesis has nice extra things like syncing of memos.
  • for a SyncML server I’m using Memotoo. I could’ve setup my own SyncML server, but at $5/month Memotoo is cheap, and I know it works…
  • on the Android Market there’s a Keyring client, thus enabling me to bring across my Palm Treo Keyring (full of Secret Squirrel Stuff, like passwords for servers, etc). I’m yet to work out how I’m going to back this up, but probably something with Memotoo

So, I’m using SyncML clients on my Treo and Android to sync up to Memotoo, keeping both in sync. Memotoo gives me a nice desktop that sort of replaces the JPilot desktop (so I can type stuff in at a real keyboard and sync it to my phones). Shweeeet, I’m almost migrated!

 

Next Page »