Not a WPMU DEV member?
Get access to super-powered hosting, site management tools for all your sites on any host, 24/7 live support, premium plugins, and private member forums!
Learn more Already a member? Login

-
-
Brendan commented on Create a Like & Follow button to share posts on friends feedJan 17, 2016
Ok thanks will give it a go and see what happens. Thank You -
Brendan commented on Only show posts created by authors who are friends of the current userJan 08, 2016
Hey Michael, Thanks for that code but now we are getting this error Warning: implode(): Invalid arguments passed in /home/u248157444/public_html/outrankd/wp-content/themes/pieces/index.php on line 19 Showing up on the websites main page -
Brendan commented on Only show posts created by authors who are friends of the current userJan 07, 2016
Thanks for that Adam but when we try to load the site using that we get Parse error: syntax error, unexpected 'else' (T_ELSE) in /home/u248157444/public_html/outrankd/wp-content/themes/pieces/index.php on line 72 A copy of the pastebin below http://pastebin.com/4Bvbs5sy This is how we loaded the function in the friends.php file: /* function friends_get_list($tmp_uid, $friend_status=1) { global $wpmudev_friends; return $wpmudev_friends->friends_get_list($tmp_uid, $friend_status); } */ //Function for 'show friends posts only query' function friends_get_list($tmp_uid, $friend_status=1) { global $wpdb; $friend_status = intval($friend_status); if (($friend_status != 1) && ($friend_status != 0)) $friend_status = 1; if ( $friends_list = get_transient( 'wpmudev-friends-'. $tmp_uid .'-'. $friend_status ) ) { return $friends_list; } $query = $wpdb->prepare("SELECT friend_user_ID FROM " . $wpdb->base_prefix . "friends WHERE user_ID = %d AND friend_approved = %d", $tmp_uid, $friend_status); //echo "query=[". $query ."] $friends_list = $wpdb->get_col($query); set_transient( 'wpmudev-friends-'. $tmp_uid .'-'. $friend_status, $friends_list, 60 ); return $friends_list; } -
Brendan commented on Only show posts created by authors who are friends of the current userJan 05, 2016
Hey jude, All we have done so far is installed the plugins we haven’t loaded it into the index.php nor content.php. We were only provided with the code in our question by someone else on the forum and haven't gone about using it because we don’t know how to basically…. could you add it in at the right points to the index.php? -
Brendan commented on Only show posts created by authors who are friends of the current userJan 04, 2016
-
Brendan commented on Only show posts created by authors who are friends of the current userJan 04, 2016
Hey Jude, Thanks for the help its very much appreciated. I am just wondering if you could explain where abouts we put that code in the post so it works and we dont mess up any of the other site functions. Also want to confirm that the code we put in the question (the function called friends_get_list) should be placed in the functions.php file and then called into the index.php file? This is the loop called in the index.php file http://pastebin.com/b17wFnMT
Upgrade Membership
Hello - you seem to have stumbled upon a super-secret ultra-private members-only page on the WPMU DEV forums. This is where people go to discuss their business secrets and development tips. Want in?
- Access to business, marketing and development sparring with peers
- Access to business, marketing and development sparring with peers
- Access to all our premium plugins
- Access to all our premium plugins
- Full Security, SEO, Backup and Performance service suites
- Full Security, SEO, Backup and Performance service suites