Ok I was able to eventually figure it out, what I did was exclude the main blog from the code.
<?php if(current_user_can( 'edit_posts' )) {
global $current_user;
$blogs = get_blogs_of_user( $current_user->id );
if($blogs) {
foreach ( $blogs as $blog ) {
if($blog->userblog_id != 1) {
echo '<li><a href="http://' . $blog->domain . $blog->path .'upload-and-manage-documents/">My Documents</a></li>';
echo '<li><a href="http://' . $blog->domain . $blog->path .'upload-and-manage-documents/?ptype=settings&tab=gateways">Settings</a></li>';
}
}
}
}
?>
Related Posts:
- How to set base url for php widget
- Encode text string being appended as query to URL [closed]
- Is it safe to use $_SERVER[‘REQUEST_URI’]?
- How to check if image is already stored in a site’s post database? (network)
- The correct method to pass query vars in AJAX using ajaxurl
- Sorting list of sites from multisite network using wp_get_sites
- How to check if feed URL was requested?
- How does wordpress know which site to setup (on multisite)?
- urlencoding of the_title() doesn’t work?
- How do I get the author’s page url from their ID?
- Network installation giving errors when viewing or adding a user
- Filter the blog title displayed in the header
- Fix 403 error on WordPress multisite network using subdomains
- Concatenate site_url and string doesn’t work
- What’s the proper way to use wp_enqueue_script/style?
- How to create Sub Sub domain Multi User blogs?
- Why am I getting ERR_NAME_NOT_RESOLVED when I add a site to my multisite installation? [closed]
- php syntax – how to concatenate properly – echo bloginfo(‘stylesheet_directory)
- Custom php page outside the scope of my theme
- Extract subdomain and relative address from a url
- Remove query string specific key value
- WordPress (3.9.1) MultiSite Permissions. Is chown the answer?
- Echo URL of large version of Featured Image
- Why does WordPress remove my variables in the URL?
- Adding hreflang tags automatically in WordPress subdirectory multisite
- How to change home or site url using action hooks or filter?
- wordpress media library new uploads don’t write to database
- Dynamic content based on a URL parameter
- How to change redirection route to a php page for making it only accessible by logged-in members?
- How to use $_GET function WordPress backend
- How to call plugin function per site in a multisite?
- NGINX rewrite rules for multisite
- My php header() function is not working [closed]
- Subdomains with almost the same content
- Scrape external webpage for first image and add it to new post
- Create custom permalinks to show Custom Post Type’s relationship?
- Change “en-US” to “en”
- Moving code from theme header to functions.php
- Why is $wp->request empty in WordPress 6.0?
- wp_redirect only works on main site and not on other sites
- How to pass a PHP $_GET variable and fetch/output it?
- Timthumb.php image gallery not working on Multisite WordPress
- Find Site ID From WP_Post
- List all blogs, but exclude the main site
- How to disable all logins except Network login in WordPress Multi site?
- change default RSS feed URL
- How do i add slugs to a URL, but still redirecting to the same page
- Nginx WordPress and another Web app URL structure
- how to get attached file url for current post?
- Is it legal to redefine wp_password_change_notification in a mu plugin?
- Creating customized php files in theme folder
- Authentication from sub-folder non-wp cookie WordPress
- How do I include an external PHP file in a subdir WordPress install?
- Comment_author_url doing nothing
- CSS images don’t show up with bloginfo
- WordPress is removing query variables like page, p from the URL of a custom static page
- How to Redirect Buddypress Directories To Login Page For Non Logged in Users
- Workaround for og:image unsupported webp image type, Yoast SEO?
- How to define a rule in functions.php that ONLY disables the default wp functionality that undesirably changes ‘&’ to ‘#038;’?
- WordPress Multisite login_redirect to primary blog and specific page based on role
- Allow two posts (from different categories) to have the same slug
- Prepend to all image URLs with PHP, only for mobile devices
- how can i redirect dynamic URL in worpress base on ID in htaccess or wp-config or function.php
- Add Link to PHP message
- Rewrite rule not working, but only when parameter is text
- Get WordPress username to customize url
- Merging Multiple WordPress Websites
- WordPress/NGINX not respecting the category URL for new posts
- Annoying/confusing WordPress memory limit exhausted
- Meta inserted through wp_insert_post gets messed up
- Create form which redirects to site in network?
- Multiple WordPress sites with different theme and plugin sharing the same content
- Need to Echo A Url path to show on a wordpress page
- PHP script to redirect traffic based on website accessed
- I want url from a file in media using title file
- Transfer WordPress Login Session to an Extended Webpage on the Same Domain
- Previewing/Updating some Pages causes “The requested URL was rejected” Error
- Resource 404 error on multisite subdirectory install
- extract url from a hyperlinked string in PHP [closed]
- WP Admin Bar – Get current theme name as custom menu title
- Removing all my hardcoded URLs with get_site_url()
- Retrieve first image url from custom post with pagination
- WP multisite network plugin fails to see classes loaded with spl autoload
- Host does not allow remote connection, so how do I transfer data to my WordPress site?
- Trying to post information from a remote database to wordpress page
- Passing multiple variables through url (php)
- Get current WordPress page then add #post ID to the end
- Force string into signup form
- How to include support for all page types, calendar urls, archive, etc
- Whats wrong with my code? Need To add String to shortcode? [closed]
- Remove /category/ from category (archive) page URLs (without using a plugin)
- I need a button to appear when not loged in and another when logged in, I need help fixing code PLEASE!
- append special url end of my website urls
- Losing Session ID and sessionStorage when navigating to other domains on Multisite
- How can I change the URL via add_rewrite_rule()
- bloginfo url in javascript
- How to extract URLs from wordpress taxonomies
- Create a custom plugin with dynamic child pages listing database records
- add_rewrite_rule image from /images/site2/favicon.ico to /favico.ico
- Internal server error when enabling Multisite in WordPress