How to exclude visited posts from loop

This is a heavier question than you think. You’ll need to do quite a bit: Set a cookie in the user’s browser to keep track of the posts they’ve seen. Pull data out of that cookie to get a list of post IDs Add this to the array with the $featured_post_id to pass it in … Read more

Listing Specific Categories from Current Post with Depth

This takes all the categories associated with your post and checks if they are parents of anything else. If one is not, it is the lowest category and is echoed out. <?php $postCats = wp_get_post_categories(); foreach($postCats as $childcat) { //this is a top level category if ($childcat->category_parent==0) { continue; } for ($J=0;$J<sizeof($postCats);$J++) { //if another … Read more