total post count of a category and its child categories wordpress

Use following code to get total posts count of a category and all its child categories. To use this code you have to add following function inside your themes functions.php file And yo use this code to display post count call this function anywhere inside your wordpress template files as This code snippet is useful to…

WordPress Recent posts from Current / Same Category

If you want to display recent posts from same category in which current posts resides then following code inside single.php will display recent 5 posts from same category. Just add following code inside single.php file at the location where you want to display recent posts. If you want more number of posts just change numberposts’ =>…