Forum Replies Created
I’ve managed to create a workaround for now. Thanks anyway! Topic can be closed for now.
I’m using a lot of the links that are stored in the nav component. The user was in those links automatically. And that was the username.
I wasn’t aware that it would also work with the ‘me’ part in it instead of the username.
I want to make this as automatically as possible. Is there a way to retrieve the links from the nav component automatically with ‘me’ in it? Or is there a way to make it that way?
Maybe I should elaborate some more on the issue:
It is happening on a multisite environment
The ‘username’ part is missing from the URL’s that should point to a specific page in the users profile. Therefore dynamic links are not working for us.
The link should be: https://website.com/members/%5Busername%5D/profile
But instead we get: https://website.com/members/profile
I’ve checked if this could be because of a plugin or theme conflict. But even with a clean install and the TwentyTwenty theme, it still doesn’t work.
Removing the feeds like this would be the best way in my opinion.
Is there any way to update/change this code so it works?
Maybe I can elaborate on the problem some more:
If I set the links and view the menu, the URL’s of the user that sets the menu are being used. For all other users. That’s not what we want to achieve.
We want to achieve that, for example, the profile link is dynamic and changes to the right URL for the logged in user.
Is there someone who had the same problem and has a fix?
Thanks in advance!
I’ve found a way to fix this. I use the bp_activity_post_type_unpublish function to remove the activity after it is added, in combination with the save_post hook where the post meta I need is available.
Topic can be closed.
I’ve been working on this and made a little progress. But now I have the following problem:
I used ‘bp_activity_before_save’ to get access to the activity object, so I’m able to set the ‘type’ to false and prevent the activity from being saved.
I want to use a custom meta value to allow / disallow an activity from being saved. But when I use ‘bp_activity_before_save’, I cannot get the post meta values from the associated post.
Is there a way / a hook or something that runs later than ‘bp_activity_before_save’, but still runs in time to stop the activity from being saved?