Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Activity: Custom Links for Custom Post Type Entries (2 posts)

Started 1 year, 4 months ago by: Suzanne

  • Profile picture of Suzanne Suzanne said 1 year, 4 months ago:

    Hi guys – I need to tweak the activity function that outputs activity entries to the activity stream so that when someone posts a comment to a post from my custom post type (notes), it actually uses a link OTHER than the permalink. For context, I created a plug-in that adds Notes functionality to member profiles. Members can write notes and I forced all notes to display within member pages, not through single.php. All is good there – even the activity entry for new notes has the right link (i.e. /members/username/notes/view/123/) but if a comment is posted, the activity entry is showing the natural permalink for the post (i.e. http://mydomain.com/notes/the-note-title/)

    Anyone sneaky enough to know how to override the default behavior to get my custom post type comment activity pointing to the right links?

  • Profile picture of Puanthanh Puanthanh said 1 year, 2 months ago:

    bp.blogs.php line 415
    //if ( ‘post’ != $post->post_type )
    // return false;
    That does the job.
    Can someone show a new function to override the above from functions.php