Skip to:
Content
Pages
Categories
Search
Top
Bottom

Adding Location to the Bottom of Activity [Code]


  • vanleurth
    Participant

    @vanleurth

    Hello happy programmers,

    I’m trying to add the #location of the user to all of my activity.
    This is what I have so far (see below).

    COULD YOU HELP WITH;

    This function adds the location at the beginning of the activity content but I would like to add it to the bottom of the activity content.
    Could you recommend modifications or code or links to posts about this?

    Thank you,
    V.

    function mmActivityAddImage() 
    {
       $bp_location = bp_get_profile_field_data( 'field=Location&user_id=' . bp_get_activity_user_id() );
    				
    	echo "<a href=http://dev.areyoupop.com/activity/?s=#" . $bp_location . ">#" . $bp_location . "</a>";
    	}
    }
    
    add_action('bp_activity_excerpt_append_text', 'mmActivityAddImage');
Viewing 2 replies - 1 through 2 (of 2 total)

  • shanebp
    Moderator

    @shanebp

    Try using a different hook.

    add_action('bp_activity_entry_content', 'mmActivityAddImage');


    vanleurth
    Participant

    @vanleurth

    @shanebp thank you that worked !!

    Are there links on how to get the large image in the activity entry.php file instead of the small version?

    Thank you for your help

    V.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding Location to the Bottom of Activity [Code]’ is closed to new replies.
Skip to toolbar