by

Using Thesis headline filter to streamline your blog

Thesis (a WordPress theme) recently introduced a headline filter in version 1.7, which removes (not display:none, but from the document altogether) title, by-line, and date on posts you select.

This is really handy for building a blog with a style closer to Twitter or Tumblr, or a mix of styles.

Two concerns, though:

  • If we post something on the web without a date we’re doing it wrong. Thesis’ headline filter removes title, but also date, from posts. Bummer.
  • Title’s important for syndication. Even if the title’s not shown, you have to title the content for readers coming from Facebook, Google Reader, etc. Blank title, body-like titles, or title-like bodies, are sloppy. This is a problem bigger than Thesis and worth thinking about if you go with this approach.

Though I’ve seen repeated mention of this headline filter feature in Thesis 1.7, I  had a heck of a time finding it.

The secret: filters are only available to developers. Ew.

Fortunately what I think is a common scenario, hiding the headline of posts in a certain category, can be done with a cookie cutter. Here’s an example:

  1. Create a new post category or use an existing one (I’m using category “bits”)
  2. Edit the file /wp-content/themes/thesis_17/custom/custom_functions.php. Insert (carefully):

    function shown_headlines()
    {
    return (!in_category('bits'));
    }
    add_filter('thesis_show_headline_area', 'shown_headlines');

    and replace ‘bits’ with your category.

For more complicated criteria, you might look through the “is_” functions in WordPress Function Reference and consult your local WordPress or PHP fiend.

  1. Thanks for this, it is a little over my head, but I would really appreciate your guidance. On my blog, http://www.eileenlonergan.com/articles, which is on my site, that I built using Thesis 1.6, the two most recent posts show up without a headline. Once they become a teaser, they have a headline, but I can’t figure out how to fix this (it is driving me crazy!)

  2. Hmm, I’m not sure. I suspect this was not designed to be used on pages that have teasers turned on, if it doesn’t hide them just the same as it does headlines in non-teaser posts.

Comments are closed.