-
Henry replied to the topic Create a separate home page for logged in users in the forum How-to & Troubleshooting 11 years ago
Any initial thoughts on the most optimum way to achieve this considering the reporcussions on SEO etc?
Keep in mind the search engine bot will be visiting your site as a ‘logged-out’ site visitor, so it won’t see any of the content you display to logged in users only.
One approach you could take is to have a different front page…[Read more]
-
bp-help replied to the topic [Resolved] Dynamic URL's for Buddypress User Profiles, Friends etc in the forum How-to & Troubleshooting 11 years, 5 months ago
@craigheyworth
Check this link out and see how it implements a profile link to the wp_nav_menu
http://pastebin.com/HSpJNLyV
You can see how to construct the profile link to add to the wp_nav_menu. Use the code I previously supplied to construct the links. -
bp-help replied to the topic [Resolved] Dynamic URL's for Buddypress User Profiles, Friends etc in the forum How-to & Troubleshooting 11 years, 5 months ago
@craigheyworth
Where there is a will there is always a way! -
bp-help replied to the topic [Resolved] Dynamic URL's for Buddypress User Profiles, Friends etc in the forum How-to & Troubleshooting 11 years, 5 months ago
@craigheyworth
Your welcome glad I could assist you! -
bp-help replied to the topic [Resolved] Dynamic URL's for Buddypress User Profiles, Friends etc in the forum How-to & Troubleshooting 11 years, 5 months ago
@craigheyworth
Oops I forgot to wrap the code lets try again:
For Friends Link:
<a href="<?php global $current_user; echo home_url() . '/members/' . $current_user->user_login . '/friends/'; ?>">Friends</a>
For Messages Link:
[Read more]
<a href="<?php global $current_user; echo home_url() . '/members/' . $current_user->user_login . '/messages/';… -
bp-help replied to the topic [Resolved] Dynamic URL's for Buddypress User Profiles, Friends etc in the forum How-to & Troubleshooting 11 years, 5 months ago
@craigheyworth
You can try these with the text widget providing you enabled php like my example above.
For Friends Link:
user_login . ‘/friends/’; ?>”>FriendsFor Messages Link:
user_login . ‘/messages/’; ?>”>MessagesMay not be perfect but it works. You could add an unordered list and wrap them in list items and style them how you choose. Good…
-
bp-help replied to the topic [Resolved] Dynamic URL's for Buddypress User Profiles, Friends etc in the forum How-to & Troubleshooting 11 years, 5 months ago
@craigheyworth
I was actually just responding about it being dangerous. I simply meant if someone tells you it is dangerous they should at least say why, after all you was only going to use it to add links. -
bp-help replied to the topic [Resolved] Dynamic URL's for Buddypress User Profiles, Friends etc in the forum How-to & Troubleshooting 11 years, 5 months ago
@craigheyworth
I guess that is good info if you knew in the first place how to create your own widgets and I am assuming you wouldn’t otherwise you wouldn’t have asked for help. Also if one does not elaborate why it is not safe, I personally would like to here the explanation as to why myself. You just wanted to create some dynamic links correct?…[Read more] -
bp-help replied to the topic [Resolved] Dynamic URL's for Buddypress User Profiles, Friends etc in the forum How-to & Troubleshooting 11 years, 5 months ago
@craigheyworth
You would have to enable php in widgets before you do anything. You can use this code in your themes functions.php to enable it:
[Read more]
add_filter('widget_text','execute_php',100);
function execute_php($html){
if(strpos($html,"<"."?php")!==false){
ob_start();
eval("?".">".$html);
$html=ob_get_contents();…
@craigheyworth
Active 4 years, 7 months ago