Show a link only if it exists?
On the profile page of each author on my blog, I want to show a link to all posts by a user.
Okey, that part is easy. But I want to show something else, if the author has not yet made any posts, such as “This author has not made any posts yet”.
At the moment, the link looks like this:
But if the user has not made any posts, they end up at the 404 page, which is a bit unprofessional.
Is it possible to fix this with some nice coding?
Any help highly appreciated.
I am using WordPress MU and Buddypress (latest versions)
- The topic ‘Show a link only if it exists?’ is closed to new replies.