21
Got Now-Reading working
Filed Under This Site | No Comments Yet | Page Tools
I have been using a plugin (application) on my LinkedIn page that shows the books you’re currently reading (and have read). It’s been annoying my colleagues as every update to my booklist appears in their LinkedIn email digest.
So I found the Now Reading plugin by Rob Miller and had a look at it. Then I found the updated one for Wordpress 2.7 which I installed. This is fundamentally the same as Rob’s one with the admin pages updated for WP 2.7.
It took quite some time to get the php template files to work. As per the documentation page, if you’re using a custom theme (as I am) you need to create a now-reading sub-directory under the theme directory and copy the template files to there. I did that but the pages displayed like HTML from the early 80’s (basic fonts, white background, blue hyperlinks). What the?
The template files only include the body of the pages (i.e. the bits that go inside the div tags with an id of rap).
<?php get_header() ?>
<div class="content">
<div id="content" class="now-reading primary narrowcolumn">
<div class="post">
...
</div>
<?php get_sidebar() ?>
<?php get_footer() ?>
If you want the look’n'feel of your WP theme, you need to make sure you include all of the css files and other code you use to build your site.
So I added the standard header and footer info from my other pages and found that my pages were blank. When I looked at the HTML source in the browser, everything below the <div id=”rap”> statement was missing. After adding and removing stuff from the head of the file I found that one of the entries there was conflicting with the <?php get_header() ?> call. I trimmed down my header entries to what I really needed and it’s all working fine now.
Click on the book in the sidebar to explore my library.