charliebrimm
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Determine if category.php is called BEFORE query firesI forgot to mention that I tried that. This causes a conflict with other pages that are of the same type archive.php is affected as well as other pages on the site so I want to single out category.php only. is_category doesn’t work unfortunately.
Forum: Fixing WordPress
In reply to: Change default query using request filterHmm. That’s a bummer because I was trying to avoid running the query twice which is why I added it as a filter. BTW this is a network site that has 10 blogs and there are many instances where I am using switch_to_blog to get posts from the main blog. I’m trying to keep the queries down because this will be a pretty high traffic site inside an enterprise.
Forum: Fixing WordPress
In reply to: Change default query using request filterThat makes sense. So you are saying to put this in the template file itself? Or somewhere else?
Does this cause the original query to get tossed away and then the query is rerun?
Forum: Fixing WordPress
In reply to: Change default query using request filterThat’s not a bad idea, but where would I put that variable? The function and filter are added to functions.php so that it gets run before the original query has fired so that’s a tough one.
I also need to do this for another query that is fired on the main index page of the site as well and a filter to alter that query to something else.
Forum: Plugins
In reply to: [File Gallery] [Plugin: File Gallery] Simple gallery WITHOUT ThickboxCool. Thanks for the follow-up.
Forum: Networking WordPress
In reply to: Pagination issues when using switch_to_blogI 100% agree with your logic. I wanted to pursue the content in that fashion. I cannot because of the project requirements that are out of my control.
I took this over midstream and am at least trying to make the queries less expensive by not using query_posts and using a filter to change the query before it is run. The original queries were getting tossed away on every page which is painful.
Forum: Networking WordPress
In reply to: Pagination issues when using switch_to_blogI tried that but failed for other reasons. My requirements are:
1. Have blog 1 be aggregate of all blogs (works with both methods)
2. Secondary blogs have three sections that require special queries such as: All (items only posted in blog 1(not agg) AND posts from current), Main (posts only from blog 1(not agg), Blog(posts only from current blog which requires no switching)If I use the method you mention I have to find a way to filter posts that originate only from blog 1 and not the rest of the posts that are aggregated.
I think either way I am going to have to switch but the less the better.
With that info what do you suggest? And thanks for your input.
Forum: Networking WordPress
In reply to: Pagination issues when using switch_to_blogPastebin https://pastebin.com/MY62H8k4
Ok. So at that point it doesn’t really matter if the tags blog is defined or not because it is no longer being used?
If the box is not ticked I’m assuming that the tags blog is doing redirects to the main blog?
Can you explain or point me to what the pros and cons are of using a tags blog or the main site? I see that one is that the main blog becomes an archive and not it’s own blog anymore.
I’m working with a network that was built by someone else and didn’t meet all of the requirements.
That’s what I figured. I was trying to figure out why it was not working properly so I switched to 2011 theme and there it was. The culprit was the custom theme. It was using switch_to_blog() to switch to the tags blog for the main site.
So this was building the main page from the posts in the tag blog but the cats were being built differently.
This got a little screwy ticking the box for add posts to main blog with a separate tags blog being used in config.
After I ticked the box to add posts to the main site and the posts stopped adding to the tags blog. Is this standard behavior or could be the custom theme?
In config it says: You can create your post archive in a specific ‘tags’ blog of your choosing, or you can use the main blog of your site. Each has it’s own pros and cons.
Is there somewhere those pros and cons are listed? I am trying to figure out the best way to fulfill our needs.
Thanks for your time and help.
Forum: Networking WordPress
In reply to: Get folder name for each multisitePerfect Curtiss!
Thanks. I’d tried blog details but not like that.
Forum: Networking WordPress
In reply to: Get folder name for each multisiteThanks for the links. Unfortunately neither work for me. With get_blogaddress_by_domain($domain, $path); I get:
$current_site->path returns /
$current_site->domain returns website.com as expected
$current_site->id returns 1 which is the main blog not the blog I am viewing.
I am including this in header.php of the them because this is where I need the value
I can get a full url using other wp functions but all I really want is the current blog directory.
Thanks!
Forum: Networking WordPress
In reply to: Subdirectory ProblemsMy understanding is that you do not have to do anything to the actual sub directories. When you create a new site/blog in the network area it will create the subfolders necessary to run that blog.