I have built a wordpress theme in which I have listed employees of the organization via custom post type. And I am displaying each employee profile via custom post type.
The employees listed are authors in my website too and they regularly write posts. When I am viewing each employees Profile page, I want to show the last post written by that employee.
Getting author’s last post is easy….but what I want is completely different. As I am showing employee’s profile in my site via custom post type. So when I am viewing an employees profile page (which is not via author.php), I want to show the latest post written by him….assuming that employee is an author on the site.