You could test using the following conditionals
//if you aren't on the main site, and aren't on the homepage
if (!is_main_site() && (!is_front_page() && !is_home())) {
print "<a href="https://wordpress.stackexchange.com/questions/238529/sub-blog-homepage">home</a>";
}
//if you aren't on the main site, and aren on the homepage
if (!is_main_site() && (is_front_page() && is_home())) {
print "<a href="main-site-homepage">home</a>";
}
Also depending on how your sub-blog homepage is configured, you could use either is_front_page()
, is_home()
.
Related Posts:
- How to delete post revisions?
- Perform action on WPMU blog deletion
- Changing Multisite themes on mass
- Upload path/URL weirdness for the main blog of a multisite/network setup
- WP_Site_Query vs. WP_Network_Query in WordPress 4.6
- Multisite/network–automatic self-registration, blog setup
- COOKIE_DOMAIN setting confusion
- Sitemap Plugin for WordPress Network
- Restrict users on multisite WordPress install
- Possible to make custom role in multisite that can add sites?
- Which is the recommended method to transfer a wordpress site to wordpress Multisite?
- Hierarchical Page Listing of all Pages in a Multisite Network
- Asian language multisite IDN subdomain
- Using separate Apache log files for multisite
- Changing Multisite URL after the subsite has been in use
- Can’t find “Add New” button for themes in a multisite
- Network setup tab is not shown under Tools
- Set multisite settings when new site created
- SQL to check how many sites a user is a member of
- Multi-site: Change the URL of main site to HTTPS
- How to show sites under “My Sites” Menu in admin panel wordpress multisite?
- What type of Google tracking should I use?
- How can I get multisite primary blog (url or path) for current user?
- convert from single site to multisite (network) with existing subdomains
- Replacing the default content created while the site creation
- Yoast Sitemap grouping external sitemaps [closed]
- Change Username?
- Multisite, can’t see sub blogs
- Google Docs Viewer have problem in MultiSite sub-blogs
- upgrade from WPMU 2.9.2 to WP 3.2.1
- What does “Use BalanceTags” Do?
- Images don’t show up
- How to create a network using a command line script?
- How to list WP multisite languages
- Can you manage multiple domain names from a single WordPress multisite network?
- How to use a Wildcard SSL with WordPress Network?
- Migrating wordpress multisite and domain mapping plugin
- WordPress Multisite – Can 2 domains share a database of users?
- Can you create a local wordpress network / multisite install on a mac with subdomains?
- How to solve this issue
- What is the way to share data between sites in a multisite
- ERR_TOO_MANY_REDIRECTS when i config my subdomains
- Subsite access without being a member of the subsite in wp multisite network
- Redirect loop after activating wordpress multisite feature
- Run additional service on domain with WordPress Multisite?
- Development of new theme and rollout on multisite
- WordPress Network (multisite) — how to ensure each site has their own admin URL?
- WordPress multisite proper prefix attribution
- Is it possible for a child-site of a multisite to be a multisite itself?
- WordPress stuck in deleting user
- How to show only blog-domain instead of the whole permalink in the loop
- Multisite installation on an existing single installation
- Multisite Sub domains not working
- How Can I Change The Name Of My Subdomain in WordPress Multisite
- Display site description instead of site name
- Multiple subsites in a single wordpress installation
- How to sync roles across Multisite?
- WordPress multi-site: How do I create the home page, the root URL?
- Multisite Subdirectory Site Dashboard redirect loop
- WordPress Multisites or Multiple WP Single sites?
- Is it possible to query posts with tax queries after multisite switch_to_blog() function?
- In Multisite the users profile picture keeps disappearing for “the other site”
- Is it possible to disable html code error auto fixing feature by wordpress 4.9.1?
- LimitInternalRecursion error
- Should I use Multi Site to achieve different designs for different sections?
- User registration is currently not allowed
- $_SERVER[‘SERVER_NAME’] in WP_SITEURL
- WPMU on MySQL limited to 1GB of space?
- Two installs conflicting – Pages redirecting
- Give users acces to admin a single post or set up WP network?
- WP-Cli Error When Mapping Multisite Subdomain
- WordPress Multisite for multi-language
- Can I use the main Multisite as a backend only?
- WP Multisite Sub-Domain Error
- Downloading customized theme from wordpress
- WordPress multisite condition for certain blog_id’s
- the menu of the network does not display my second website
- Multisite – site user limited only for this site
- Get variable from previous blog while using switch_to_blog
- Should i use multisite for my business?
- WordPress Network with SSL for multiple domains
- Nginx rules for subdomain multisite install (Bedrock)
- WP Admin Panel for Multi-site install not loading JavaScript for one Subdomain
- WordPress multisite not working
- multisite detect subsite blog number
- How to Create WPMu New User?
- New multisite redirects to main site
- How to disable style filtering in post?
- Is it possible to create a login for restricted visibility?
- Create a Network of Different websites with wordpress
- WP Multisite: Do a function after blog is activated
- multi-language multi-site with REST API
- How to make Multisite global login that redirects to correct subsite after login
- Advice on WP site structure using multisite
- How to login Separately in each blog?
- Single installation with sub-domains for admin and separate domains for sites
- The wpmu_blogs_columns filter is not working
- Map WP Multisite blog.example.com to anotherdomain.com/blog?
- get_category_link() or get_tag_link() return wrong category/tag base in wordpress multisite
- Multisite subdomain microsite on secondary domain