Daily J Your Daily Dose of Vitamin Japan!



« Chemist, where are the interviews? Mysterious Underwater Pyramids »

Navigation for the navigationally challenged wordpress themes

On August 25, 2008 in Blog Improvements, Helping Japan Bloggers

It is good that certain things irk some more than others.

Nick over at LongCountdown had been bothering me for awhile about not having good navigation.

As the editor I know where everything is so not having great navigation doesn’t bother me (which is not good). I don’t think about it as much as I should, so it is nice to have someone who reminds me of how things are from the reader’s perspective. Thanks Nick.

So how about you, Japan-blogger? Is your navigation lacking?

If you use wordpress (self-hosted) and need navigation, today is your day.

Here is the code you will need to enter to help readers navigate to next and previous posts:

Instant navigation in Wordpress. First find single.php,
(that's YOURSITE.COM/YOURBLOG/wp-content/themes/YOURTHEME/single.php)
In single.php in your theme, find:

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

and right below it, paste:

<!--navigation-->
<table style="width: 100%; text-align: center; border:0px; margin-bottom: 6px;">
<tr><td class="text" style="text-align: left; font-size: 8pt;">
<?php previous_post_link(); ?> </td>
<td class="text" style="text-align: right; font-size: 8pt;">
<?php next_post_link(); ?>
</td></tr></table>

Next I want to make my category list expandable/collapsible and make sub-categories under “interviews” for each of the sites interviewed. That way you readers can more easily find and read specific interviews. If I find it, I plan to let you know about it so you can use it for your sites too.

Have a great day,

DailyJ

  1. Nick Ramsay Said,

    You can make expandable/collapsible boxes with a little Javascript, but things might get complicated if you’re using widgets. I’ll give it some thought.

  2. The Chemist Said,

    believe it or not I actually don’t use widgets on this blog!

    that was by accident. I was used to blogger.com blogs and editing the template manually so I just assumed it was the same. Since then I have used wordpress to make sites for other and have used widgets.
    But I still don’t use them on here because this template for some reason only recognises the right-hand sidebar (sidebar 1). I’m sure I could change that, but I don’t mind manual edits.

    Btw, do you know if php code works inside of text widgets and posts?

  3. Nick Ramsay Said,

    I only just switched to widgets this year myself, but I do find them quite flexible, especially this one.

    It’s just like the text widget, but will let you use php code. That works great for me, but you might prefer this one, which supposedly lets you put PHP in posts, too.

  4. The Chemist Said,

    WOW!

    Thanks for the php-in-widgets plugin!
    That is super useful!

    The php-in-posts widget will be useful too.
    I’ve migrated wordpress sites (one’s I made for other people) a couple of times. Off the top of my head I think the links (and pictures) in the posts break if the site is moved to a different directory and there is a change in the url (ex:site.com/blog to site.com/journal). In other words, those links are static.
    Am I wrong about that?

    If you can use <?php bloginfo(’url’); ?>
    then those links/pics will work no matter how the blogs url changes.

    ex:
    A link in one post to another post.
    If you make it
    <a href=”<?php bloginfo(’url’); ?>/YOURPOST”> my post </a>
    it will still work if you change your blog from site.com to 2ndsite.com/blog

    if you make it <a href=”site.com/YOURPOST”>my post</a> it will break

  5. Nick Ramsay Said,

    If you’re saying the php widget is better than the text widget because you can use dynamic links, then yes - absolutely!

    If you’re saying something else then… I’m confused :???:

  6. The Chemist Said,

    Exactly. dynamic links instead of static ones.

    So it is easy to move wp to a new directory; no broken links.

    plus there are many other advantages of a php widget, of course.

  7. Nick Ramsay Said,

    What I like best about the php widget is that you can put the php function calls from old non-widget plugins in it. That means you can still use those old widgets, but have the flexibility of the drag and drop widget interface.

  8. The Chemist Said,

    That is really interesting. And useful.
    I am definitely going to use the php widget.
    I still need to get wp recognising both of my sidebars though. So tinkering I go…

Add A Comment