Hi there,
I’m not exactly sure what you are looking for, do you want the link to change when it’s viewed in each group? is the link a group based link?
Sorry fr the lack of clarity !
I’d like to embed different links in different home pages from different groups basically
One option would be to add a php widget and use a plugin to only display it in the groups pages then add some code which uses the bp_get_current_group_id()
function to return the group id, which you could check in a conditional such as:
if ( bp_get_current_group_id() == 1 ) {
echo ‘your link‘;
}
Another option that PERHAPS MIGHT work
Have a separate home page for any group you want
Try making a page template called “front-slug-group-name.php” for each group (for which a unique home page is desired)
(“group-name” being the lowercase name of the group)
and put it in wp-content/themes/your-theme/buddypress/groups/single/
as in
wp-content/themes/your-theme/buddypress/groups/single/front-slug-group-name.php
Thanks ! I’ll try that when I can and tell you if it worked
Hi !
There has been a lot going on and I didn’t get a chance to try your recommendations until now.
@Venutius what plugin could fulfill that task ?
It seems that both options involve specific coding for each individual group right ?
I was thinking, would there be a way to embed iframes in group descriptions instead ?
Thx !
oh and i don’t know how to code, but could it be possible maybe to write code basically saying “if there’s a link from this website in the description, display it using this iframe” ? (it would always be from the same site, with the same iframe parameters, just different links)
i am afraid i’m not a coder really, more a copy & paste coder!
if you just google (say) – example of a buddypress group home page
i am sure you’ll come up with a guide to making group home pages that’s if you are going down the Codex Link route
i’m just posting in case anybody would know how to code what i wrote just above
here’s what the result should look like (in this case i did it manually for this specific group)
Places
to make it clear, i now want to include iframe parameters in the code, and apply them to any link published in the group description, as long as corresponding to a specific site.
@Venutius I just saw your plugin ! awesome ! will try it and tell you how it’s working
finally it worked ! Couldn’t get the plugin to work. What I did is super simple in the end :
This guy created some code to add in functions.php
And then you’re good to go, you can use a shortcode with an iframe to embed anything in the group description !
Great! That’s neat and thanks for sharing.
welcome !
and thanks for the help :p