nearlyjen
Member
Posted 6 months ago #
Hi everyone,
Looking to do something that should be easy, but I can't seem to figure it out. I want to indicate a new blog_ID for the "main blog" so that I can select "post to main blog" and have all of the posts populate on the blog of my choice. Can someone show me where to find this bit of code? Thank you!
Jennifer
http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/
Fill in a blog name instead of checking the post to main blog. SWT only creates a blog if the name you type in doesn't exist.
nearlyjen
Member
Posted 6 months ago #
Thanks, but filling in a blog name doesn't USE that blog - it creates a blog with that name as a subdomain of the blog you are logged in to. What I want to use is blogs.eastsideprep.org. If I type "blogs" into the textbox and I am logged into http://www.eastsideprep.org, it creates blogs.www.eastsideprep.org. If I am logged into blogs.eastsideprep.org it creates blogs.blogs.eastsideprep.org. SO I need to change the blogID somewhere in the php...but I can't find it.
What version of WordPress or WordPress MU do you have?
nearlyjen
Member
Posted 6 months ago #
nearlyjen
Member
Posted 6 months ago #
Does it look like this is the bit I need to change? If the "post to main blog" box is checked, then I want it to use blog_id 147 instead of what it is doing here...how?
[Code moderated as per the Forum Rules. Please use the pastebin]
nearlyjen
Member
Posted 6 months ago #
Ok, I fixed it by hardcoding the name of the blog in. Seems to work. Thanks for your help.
J
merkin51
Member
Posted 6 months ago #
nearlyjen, any chance you could explain what you did here, including code snippets, to fix this? I'm also using this plugin for a school multisite setup, and we seem to be encountering similar queries :)
nearlyjen
Member
Posted 6 months ago #
Hi Merkin - I'm away from work until after Thanksgiving, but I'd be happy to post it all for you when I get back! Look for it next Tuesday : )
Jen
nearlyjen
Member
Posted 6 months ago #
Hi - at line 242 I just changed the domain to be = to the name of the blog I wanted to use as the tags blog, and you can see the old code commented out after. This has worked without any problems so far.
} else {
update_sitewide_tags_option( 'tags_blog_main_blog', 0 );
$tags_blog = $_POST[ 'tags_blog' ];
update_sitewide_tags_option( 'tags_blog', $tags_blog );
if( constant( 'VHOST' ) == 'yes' ) {
$domain = 'blogs.eastsideprep.org'/*$tags_blog . '.' . $current_site->domain*/;
$path = $current_site->path;