Seconds Ago Script using $UNIXTIMESTAMP
I discovered this little post by Alex Whinfield that just made me so happy. I just know that it will make you happy too. It’s a “Seconds Ago” counter that uses the $UNIXTIMESTAMP php call to calculate a time since. Works great and is very light. Get the code here.
If In Category – A WordPress Hack
I recently had a need where content needed to be included in a certain blog category and not in others. The content will only display post is in the specified category. You can use the category slug or the category ID.
<?php if (in_category('1')); ?>
<div class='someclass'>
<p>Some Content</p>
</div>
<?php endif; ?>
