Info
- 3 posts
- 2 voices
- Started 4 years ago by wittmania
- Latest reply from wittmania
- This topic is not resolved
User profile link
-
- Posted 4 years ago #
I searched for this and didn't find anything, but by scrounging through the code I found the necessary functions to make it work. I long for the day when the tags/functions in bbpress are documented like they are in WP.
At any rate, I don't really care for the "Title" line under a post author's name, and I wanted to replace it with a simple link to the post author's profile instead. The code I used was:
<a href="<?php bb_option('uri'); ?>profile.php?id=<?php echo (get_post_author_id()); ?>">View Profile</a>I added this in post.php, where the
<?php post_author_title(); ?>line had been inside thethreadauthordiv.I'm so proud of myself, I think I'll go have a snack!
-
- Posted 4 years ago #
Thanks a lot for posting it here afterwards. :D What other
bb_options are there/where did you find them? -
- Posted 4 years ago #
From doing a quick search in Dreamweaver for
bb_option, I found several different parameters that can be passed to thebb_option()function, as listed below:- version
- uri
- admin_email
- name
- path
I'm sure there are more, but I don't know what they would be. Also, for this specific application you could just hard-code in your site's uri, and the only dynamic portion would be the number tacked onto the end. But, since code is poetry, the
bb_option()method seemed much more poetic to me.As for the
get_post_author_id()function, I think I just scrounged around in other files (including plugins) until I found one that looked like it would work. And it does. -
You must log in to post.