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:
“>Show all posts by <?php bp_user_fullname() ?>
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)
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Show a link only if it exists?’ is closed to new replies.