-
Henry replied to the topic [Resolved] Link to authors posts in members_header in the forum How-to & Troubleshooting 11 years, 1 month ago
When viewing a member’s profile page, you can use
bp_displayed_user_id()
to get the ID of the member. This will then let you display a list of their posts or their latest post. e.g.$my_query = new WP_Query( 'author=' . bp_displayed_user_id() );
if ( $my_query->have_posts() ) {
while ( $my_query->have_posts() )…[Read more] -
Henry replied to the topic [Resolved] Link to authors posts in members_header in the forum How-to & Troubleshooting 11 years, 2 months ago
Hi @3rdaxis,
Which author’s posts would you like to display?
-
Henry replied to the topic Turn avatar into link to profile in an author box in the forum How-to & Troubleshooting 11 years, 2 months ago
@3rdaxis just to note that’ll work on that page only. If you want to link an avatar that’s on a member’s profile page or in the members loop for example you’ll need to use a slightly different way of getting the user’s ID.
-
bp-help replied to the topic [Resolved] Buddypress xprofile author "bio" in post footer. in the forum How-to & Troubleshooting 11 years, 2 months ago
@3rdaxis
Glad I could help! Good luck with your BuddyPress site! 🙂 -
bp-help replied to the topic [Resolved] Buddypress xprofile author "bio" in post footer. in the forum How-to & Troubleshooting 11 years, 2 months ago
@3rdaxis
The problem is it would require that the username the user entered in the profile field to match their twitter id exactly. If not it may take them to god knows where. Anyway, this is untested but you can give it a whirl!
[Read more]
<?php
if ( $string = xprofile_get_field_data( 'BIO', get_the_author_meta('ID') ) ) { ?>
<a… -
bp-help replied to the topic [Resolved] Buddypress xprofile author "bio" in post footer. in the forum How-to & Troubleshooting 11 years, 2 months ago
@3rdaxis
Untested but maybe something like this would work, in this example you would need to change “USERNAME” at the end of the URL to the persons twitter name. To get other URL’s to work you should just change the URL etc.
[Read more]
<?php
if ( $string = xprofile_get_field_data( 'BIO', get_the_author_meta('ID') ) ) { ?>
<a… -
Henry replied to the topic [Resolved] Buddypress xprofile author "bio" in post footer. in the forum How-to & Troubleshooting 11 years, 2 months ago
@3rdaxis did you change the field name to the name of your bio field?
@3rdaxis
Active 8 years, 5 months ago