latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Need help settting up Login Welcome Page

Home Forums Community Forum Need help settting up Login Welcome Page

This topic contains 6 replies, has 3 voices. Last updated by  David Roberts 3 years, 9 months ago.

Topic Author Topic
Posted: Tuesday Mar 26th, 2013 at 3:17 pm #45812
David Roberts
Username: inbama

List Of Topic Replies

Viewing 6 replies - 1 through 6 (of 6 total)
Author Replies
Author Replies
Posted: Wednesday Mar 27th, 2013 at 10:01 am #45870

Hi David.

Maybe this function helps you with that: http://codex.wordpress.org/WPMU_Functions/get_blogs_of_user

Posted: Wednesday Mar 27th, 2013 at 12:50 pm #45877
David Roberts
Username: inbama

I have the plugin to run php. And I pasted the example code onto my Login Welcome Page:

<?php
$user_id = 1;
$user_blogs = get_blogs_of_user( $user_id );
echo 'User '.$user_id.'\'s blogs:<ul>';
foreach ($user_blogs AS $user_blog) {
   echo '<li>'.$user_blog->blogname.'</li>';
}
echo '</ul>';
?> 

This may be over my head.
I am able to get it to show a bullet list, but not hyperlinks for someone to access what they subscribed to through s2member. It seems there would be a simple way for them to access the sites they have registered (maybe a shortcode) What you sent is probably on target but I’m not sure what to do with the information. It does look like it would do what I want, but I’m not sure how to integrate it into my site. Any help would be greatly appreciated. http://onevoicefamily.com

Posted: Wednesday Mar 27th, 2013 at 1:13 pm #45880
David Roberts
Username: inbama

After studying it more, it appears I could substitute some variables and make it ‘get’ what I want. What would it look like to be able to ‘get’ their ‘user name’, and links to the sites they have created? Oops, I only thought it I was able to see a list without hyperlinks. No matter which user I log in as, it shows the whole list of child sites. Help please.

Posted: Thursday Mar 28th, 2013 at 1:34 pm #45987
David Roberts
Username: inbama

Still need help with this. Thanks.

Posted: Thursday Mar 28th, 2013 at 5:19 pm #46000
Bruce
Username: Bruce
Staff Member

Thanks for the follow-up.

It looks like WordPress is giving you some variables from the function. It looks like you should be able to use the domain variable to get what you’re looking for. Maybe something like this?

<?php
$user_id = 1;
$user_blogs = get_blogs_of_user( $user_id );
echo 'User '.$user_id.'\'s blogs:<ul>';
foreach ($user_blogs AS $user_blog) {
    echo '<a href="'.$user_blog->domain.'"><li>'.$user_blog->blogname.'</li></a>';
}
echo '</ul>';
?>
That’s about as far as we can go with custom code. If you need further assistance, we recommend http://jobs.wordpress.net, or another freelance web site where WordPress® experts are offering their expertise through a bid on your project.
Posted: Thursday Mar 28th, 2013 at 10:21 pm #46016
David Roberts
Username: inbama

Okay, thanks.

Viewing 6 replies - 1 through 6 (of 6 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.