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
- Running WP Cron on multisite the right way
- Is it safe to use $_SERVER[‘REQUEST_URI’]?
- The correct method to pass query vars in AJAX using ajaxurl
- How to check if feed URL was requested?
- Integrating WordPress to my website, while keeping my own authentication system
- How does wordpress know which site to setup (on multisite)?
- Remove/unset options field from backend Settings->General?
- Multisite get_home_url(); – Getting URL for current site
- How to use wp_insert_user on WordPress Multisite?
- Network installation giving errors when viewing or adding a user
- Filter the blog title displayed in the header
- Sort posts from multiple sites by date
- 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?
- Callback URL in WordPress
- 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]
- Wrong links in WordPress?
- How is WordPress manipulating the posts like there are folders?
- Custom php page outside the scope of my theme
- Extract subdomain and relative address from a url
- Remove query string specific key value
- Why does WordPress remove my variables in the URL?
- Adding hreflang tags automatically in WordPress subdirectory multisite
- How to add values to media “whitelist_options” in wp-admin/options.php template?
- 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
- WordPress returning 404 for multisite pages
- 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?
- Search Query: how to construct a search string from two select elements?
- Need help enqueueing webfonts
- WP & Server Speed [Teacher Question]
- Change “en-US” to “en”
- Redirect to another page using contact form 7? [closed]
- Why is $wp->request empty in WordPress 6.0?
- How to check if the current page is at a specified path in the URL?
- Is it best to avoid using $wpdb for security issues?
- wp_redirect only works on main site and not on other sites
- How to pass a PHP $_GET variable and fetch/output it?
- How to avoid duplicates when creating recent network posts
- Find Site ID From WP_Post
- How to disable all logins except Network login in WordPress Multi site?
- Can’t change website Title on wordpress
- How to use title attributes in sidebar widget?
- Why, when moving a WordPress multisite network, have my theme customisations stopped working?
- Authentication from sub-folder non-wp cookie WordPress
- How do I include an external PHP file in a subdir WordPress install?
- How to add PHP pagination to wordpress
- CSS images don’t show up with bloginfo
- WordPress permalink issue
- WordPress is removing query variables like page, p from the URL of a custom static page
- How to sort posts by active category in WordPress?
- wordprees multi-site in user panel add filter
- How to Redirect Buddypress Directories To Login Page For Non Logged in Users
- How to define a rule in functions.php that ONLY disables the default wp functionality that undesirably changes ‘&’ to ‘#038;’?
- 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
- Rewrite rule not working, but only when parameter is text
- Merging Multiple WordPress Websites
- WordPress/NGINX not respecting the category URL for new posts
- Meta inserted through wp_insert_post gets messed up
- Multiple WordPress sites with different theme and plugin sharing the same content
- WordPress add_rewrite_rule
- PHP script to redirect traffic based on website accessed
- I want url from a file in media using title file
- How do I generate formatted permalinks as specified in backend options?
- List all blogs apart from the current blog and main blog in WordPress Multisite
- Transfer WordPress Login Session to an Extended Webpage on the Same Domain
- Previewing/Updating some Pages causes “The requested URL was rejected” Error
- use system script advertising in wordpress multisite
- 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
- WPMU schedule doesn’t execute actions
- WP multisite network plugin fails to see classes loaded with spl autoload
- Trying to post information from a remote database to wordpress page
- 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]
- 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
- NGINX rewrite rules for WordPress Subdirectory Multisite to support deep URL
- Remove links to the comments section
- How to Customize the Admin Sidebar Menu in WordPress Multisite Network by changing the backend code of the wp-admin code files?
- Custom theme on multisite has issues with standard loop output
- How to create a dynamic url with post title from one website to another?
- Custom plugin with dynamic child pages listing database records