Hi, probably the issue is that the plugin can handle only one viewer per page, so there is a guard in the function that sets up the resources for the plugin to work:
if (!is_singular()) {
return;
}
If the page is not of a single post (https://developer.wordpress.org/reference/functions/is_singular/), the resources are not loaded.
I’m not familiar with the BuddyPress’s custom tabs (and the link you provided redirects me towards a login page), so I’m not sure if you can configure them to meet the is_singular() requirement. If you can, that would be the optimal solution.
Otherwise, if you are sure that there will always be only one viewer in that page, an ugly hack would be to remove the guard directly from the source code of the function (the function is conditionally_enqueue_assets in the file includes/simebv-viewer.php). Obviously, any subsequent update of the plugin will overwrite this change.
I’m working in these days at a new version of the plugin, if you confirm that my guess is correct and this is the issue, I’ll try to look at it for a fix, but I can’t make any promises about precise timings.
Hi Francesco,
I shared your response with the BuddyDev team, and they replied with the following:
“Hi Danny,
Thank you for sharing their response. As I expected, the issue lies with the shortcode. Manually editing the shortcode is not advised. Please ask him to provide a filter — I can then help you with some code to enable it on BuddyPress profile pages. If we manually edit their code, it will be lost in the next release.”
Could you please provide the filter they’re requesting so we can implement a proper solution?
Thank you for your help.
Hi, adding a filter to the plugin would still require modifying the plugin’s source code. If you want a customised version of the plugin ASAP, you can contact me in private (you can find my contact info on https://portfolio3d.francescomartini.it) and let’s find an agreement. Otherwise I’ll try to address the issue in the next plugin’s release, which will probably be in the next few days or weeks (depending on how much time I’ll be able to devote to it).
Thank you, Francesco.
My colleague Alex Gonzalez will get in touch with you shortly.