Changes

obamiconme1 Two little changes here:

Blogroll with images

I’ve seen it last year here and there, but somehow lost sight of it – Maya (eisitu) and Luigi (hartgekochtes) reminded me, and so I’ve now added screenshots made by websnapr to my blogroll. It’s actually quite simple: Register at websnapr, wait for your key and then access the images with the appropriate URL:

http://images.websnapr.com/?size=X&key=XXXXXXXXXXXX&url=http://XXX

There’s s=202×152 and t=90×70 available for the size – given how large my blogroll is, I’ve picked the 90×70 version. If you’re using standard functions, you have to add these image URLs to the links in the WP admin area; since I’m using my own theme function for the blogroll anyway, I simply could add this functionality there automatically.

Opinion? :)

Single-language posts

No more “Sorry, this post is not available in English” for posts I only wrote in German (in the future and for a couple weeks back; I didn’t reassign all the old ones) – those posts get now assigned to a special category which then is excluded in the English setting. They won’t show up in the feed nor on index and archive pages (except for category archives). They’re still included when clicking through single posts.

Frank Bültge wrote about it here for feeds, I’ve changed it accordingly:

function ag_cat_exclude($query) {
  global $langswitch_lang_pref;
  if (!$query->is_category) {
    if ($langswitch_lang_pref=="en") { $query->set('cat','-385'); } else
    if ($langswitch_lang_pref=="de") { $query->set('cat','-386'); }
  }
  return $query;
}
add_filter('pre_get_posts','ag_cat_exclude');

If you want to do it without Langswitch (the language switching plugin I’m using here), leave out those parts; 385 and 386 are my category IDs of “German only” and “English only”. Other variables besides is_category are is_single, is_page, is_archive, is_date, is_year, is_month, is_day, is_time, is_author, is_tag, is_tax, is_search, is_feed, is_comment_feed, is_trackback, is_home, is_404, is_paged, is_admin, is_attachment, is_singular, is_robots, is_posts_page. If you got any questions, just ask. :)

3 Comments

  1. S

    Feine Sache das ganze. Vielleicht komme ich mal darauf zurück wenn ich es schaffen sollte mir ein neues Theme zu verpassen.

  2. b

    die bebilderte blogroll gefällt mir eigentlich ganz gut. Ich muss bei mir mal schauen, wie ich das auf eine neue Seite bekomme – falls ich mich aufraffe;-)

  3. c

    Also bisher 100% Zustimmung – schön. :)

Leave a Reply

All inputs are optional. The e-mail address won't be published nor shared.

  • Moderation: Comments from first-time commentators must be approved manually before they appear.
  • Behave yourself! No insults, no illegal content, etc.! Should go without saying, don't you agree...?
  • Website: I don't mind blogs with ads, but purely commercial links are not welcome and will be deleted. Just like pure spam comments.
  • Allowed HTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <sub> <sup> <big> <small> <u>