Show link to buddypress profile on listing page

This topic contains 5 replies, has 2 voices, and was last updated by  Guust 8 years ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #395443

    Daniel Cotillas
    Free User
    Post count: 8

    I have this code from an old support ticket to be added on the funcions.php file:

    
    
    add_action( 'geodir_details_main_content', 'my_show_author_mod', 45 );
    function my_show_author_mod() {
    global $post; 
    
    $current_posttype = geodir_get_current_posttype();
    
    	$myauthor = get_the_author();
    	$myauthorlink = get_author_posts_url( get_the_author_meta( 'ID' ) ).'?post_type='.$current_posttype;
    	echo '<p class="clearfix">Mapedo por <a href="' .$myauthorlink . '">' . $myauthor . '</a></p>';
    }
    ?>

    I would like the link to go to the Buddypress profile of the person who made the listing.

    Could you help me with that?

    Thanks a lot!

    #395445

    Guust
    Moderator
    Post count: 29970

    That should work out of the box with the BuddyPress integration addon: https://wpgeodirectory.com/downloads/buddypress-integration/

    Thanks

    #395741

    Daniel Cotillas
    Free User
    Post count: 8

    Thanks Guust,
    Could you send me a screenshot to see how it looks the link to the author from the listing detail page. What I want is that from every place you can link to the buddypress author profile.
    In the meantime, is there any way to make that just hacking the code I send you above?

    Thanks in advance,

    Daniel

    #395812

    Guust
    Moderator
    Post count: 29970
    This reply has been marked as private.
    #395870

    Daniel Cotillas
    Free User
    Post count: 8

    Thanks! That´s very useful!
    Seeing how it looks your design there and looking at mine at http://comunidad.suelourbano.org/lugares/tenencia-segura/modelo-de-dominio-de-tenencia-social/

    Where is the option to change the layout of the listing detail?

    Thanks!

    #395876

    Guust
    Moderator
    Post count: 29970

    It depends on the theme you use, that site is using Supreme.
    Other changes can be made at GD > Design > Detail tab.
    See also https://wpgeodirectory.com/docs/layout/#directory

    Thanks

Viewing 6 posts - 1 through 6 (of 6 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount