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
- How to get URL of current page displayed?
- Running WP Cron on multisite the right way
- 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
- Customize default settings on new sites on multisite
- Sorting list of sites from multisite network using wp_get_sites
- How to check if feed URL was requested?
- What is the best practice for escaping data URIs?
- 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
- urlencoding of the_title() doesn’t work?
- How to use wp_insert_user on WordPress Multisite?
- How do I get the author’s page url from their ID?
- Colon is Missing In My Website Url in WordPress
- How to change redirection route to a php page for making it only accessible by logged-in members?
- WordPress returning 404 for multisite pages
- How to use $_GET function WordPress backend
- How to call plugin function per site in a multisite?
- WordPress returns “The link you followed has expired” error page whenever I add a new site, add a user etc
- Extend PHP regex to cover “srcset” and “style” attributes
- NGINX rewrite rules for multisite
- Make a list of sites for each user in WPMU – switch_to_blog (display in SITE_ID: 1)
- 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?
- Get URL Parameters from referer
- Need help enqueueing webfonts
- WP & Server Speed [Teacher Question]
- Change “en-US” to “en”
- Redirect to another page using contact form 7? [closed]
- Moving code from theme header to functions.php
- Why is $wp->request empty in WordPress 6.0?
- Get the URL of the page from which an ajax request has been launched within ajax callback
- 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?
- Count posts on multisite with blog id
- 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
- How do I display offsite database info on my wordpress site?
- Post’s ID pattern?
- 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?
- I’m unable to call img path using single quotes in an array?
- Need to Modify a WordPress Shortcode with another wordpress shortcode
- Known Issues in WordPress When Upgrading PHP to ver 7
- WordPress homepage setup not working on first load
- change default RSS feed URL
- How do i add slugs to a URL, but still redirecting to the same page
- Split site title and apply different classes
- Can’t change website Title on wordpress
- Using bloginfo and divs inside a php file
- Nginx WordPress and another Web app URL structure
- How to use title attributes in sidebar widget?
- how to get attached file url for current post?
- Is it legal to redefine wp_password_change_notification in a mu plugin?
- Call featured image url
- Why, when moving a WordPress multisite network, have my theme customisations stopped working?
- 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?
- How to add PHP pagination to wordpress
- Use an anchor link to open an iframe inside a WordPress page
- Adding custom url to readmore link using get_permalink()
- Comment_author_url doing nothing
- need help adding a new sidebar to a page that can’t use page-templates -> multisite
- How can I fix this code [duplicate]
- CSS images don’t show up with bloginfo
- Modifying WP URL handing code?
- How to deal with a GET variable of ‘name’?
- 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
- bp-custom.php is not working on a WordPress multisite environment. how to fix it?
- 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
- How can I update WordPress plugins or WordPress itself in all server?
- Unable to display multiple parameters from url by javascript through shortcodes
- Allow two posts (from different categories) to have the same slug
- Prepend to all image URLs with PHP, only for mobile devices
- Get nice name of category from slug (remove dashes of category)
- how can i redirect dynamic URL in worpress base on ID in htaccess or wp-config or function.php
- Add Link to PHP message
- I have a background-image in css file but don’t show in site.how to fix this prblm. i sent screenshot. thx
- How to create a dynamic url with post title from one website to another?
- Custom plugin with dynamic child pages listing database records
- REST API request between domain and subdomain
- Filtered queries not responeding to page path