Skip to:

Editing the blog loop

  • Hello!
    I would like to change the url in the blog loop link to “” rather than “”.

    Should I add an action to the action hook, “bp_directory_blogs_actions”? If so, could you push me in the right direction as to how to do that? I have added actions before on the theme side, but those have been well-documented hooks. I am still a beginner in this area.

    add_action (‘bp_directory_blogs_actions’, ‘my_change_url_function’);

    function my_change_url_function () {
    //What code goes here?

    Thanks in advance for your help!

Viewing 1 replies (of 1 total)
  • Avatar of Boone Gorges
    Boone Gorges


    Check out bp-blogs/bp-blogs-templatetags.php. Those are generally the functions that are called directly in the blog loop.

    In your case, you’ll want to filter bp_get_blog_permalink. Something like:
    `function my_change_url_function( $permalink ) {
    return $permalink . ‘/category/blog’;
    add_filter( ‘bp_get_blog_permalink’, ‘my_change_url_function’ );`

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.