Filter site_url() to always point to main blog/site (Help request)
Use Case: I do not allow blog creation by users on one of my BP sites. I DO, however, make use of several blogs for other purposes on the site. For example, blog ID #2 is an “announcements” blog. Users don’t know or care that they are actually looking at an actually different blog than the main one. It works, for now.
Problem: site_url (used liberally throughout bp-default) returns mysite.com on the main blog and mysite.com/announcements on blog 2. So profiles now become mysite.com/announcements/members/username. It’s a mess and templates and sidebars are inconsistent.
I have no need for the mysite.com/announcements url and would prefer all references to site_url() to return the url of the main site/blog #1 (whatever it takes). site_url() has a filter and maybe it’s as simple as intercepting the problem there but I could use some suggestions by those who understand now what I am trying to do. Addressing this will solve a ton of header, url and other problems.
- The topic ‘Filter site_url() to always point to main blog/site (Help request)’ is closed to new replies.