Now-Reading: Default Filters on Book-Meta

Ever since upgrad­ing to the lat­est ver­sion of Rob Miller’s Now-Reading plu­gin, I noticed my sin­gle book pages were work­ing but not dis­play­ing every­thing cor­rectly. Specif­i­cally books I’d marked hav­ing been bor­rowed from my local library were being dis­played as:

  • I bor­rowed this book fromlibrary

When they should sim­ply have a line read­ing “I bor­rowed this book from my local library”. I had spent much
time fid­dling with my tem­plates try­ing to fig­ure out how the upgrade broke them and today I fig­ured it out. The truth is my tem­plate was just fine. The prob­lem is the newer ver­sion of Now-Reading was apply­ing a new fil­ter to book-meta1. That fil­ter is wpau­top and it was wrap­ping my vari­able in <p> … </p> tags. Those tags screwed up the dis­play and made my vari­able checks fail. To cor­rect the prob­lem, I went into now-reading/default-filters.php and com­mented out add_filter('book_meta_val', 'wpautop');. Now my sin­gle book pages look like they’re sup­posed to again. Yeah!

1 This is a cus­tom field avail­able in the back-end of the plu­gin and it is where I store the infor­ma­tion telling my tem­plate if I bor­rowed the book and from whom I bor­rowed it.

Similar Posts

About Mark McKibben

Mark works as a [REDACTED] for [REDACTED], currently residing in Iowa. CoffeeBear.net is a place for him to blather on about whatever strikes his fancy. He currently spends his "free" time working on a photography project, playing with his cat and attempting to keep his wife happy (not necessarily in that order).

Leave a Reply

Notify me of followup comments via e-mail. You can also subscribe without commenting.