Categories
Burningbird

About this entry

I added an entry to the top of the sidebar for my individual entry pages that lists information about the post, including: author, date and time of post creation, categories, a link to syndicate the comments for that post, post comment status, and other information.

I didn’t like the PREV_POST and NEXT_POST line at the top of the page. No reason why, just personal preference. But once I moved the entry navigation over to the sidebar, I started thinking of other bits of information that would go nicely with the individual post navigation links.

To populate this information, I’m using several WordPress functions that normally only work in what is known at The Loop — the opening and closing code to process the post(s) for a specific query. However, you don’t have to use these functions within The Loop as the data is global to the page — the last data set should persist throughout the rest of the page. Once you’ve processed the post in a page, the data should be available from that point.

Since I process my posts before my sidebar contents in my layout, to make the page more accessible to those using speech browsers, the data last set is still available to my sidebar. It’s just a matter of adding the function calls. Now, I can print out any type of information about the post in the side without having to re-create The Loop.

Of course, the results won’t be effective in pages that process several posts, but works nicely with individual pages.

Print Friendly, PDF & Email