Thanks for Your answer Rad, great help as allways. Let me break it into parts, so I can understand everything perfectly:
1.a.
Your code works like a charm - does exactly what I wanted it to. I had some trouble understanding it though. From what I got, the part that actually changes layout between “fullscreen” and “sidebar” is the last part:
if ( is_singular( 'post' ) || is_home() || is_archive() ) {
$layout = "content-sidebar";
}
if ( is_page() ) {
$layout = "full-width";
}
I even managed to add my own rule for bbpress so it has “fullwidth” layout too, just to check if I was right:
if ( is_bbpress() ) {
$layout = "full-width";
}
What I hove trouble understanding though is what the first part of code does. You seem to just check current layout for all possible page sections and just set it as it was (home, buddypress) and at the same time set it without checking in other cases (product, 404). Could You be so nice as to explain why exactly? I feel like big part of this code is reduntant (subjective, low-educated guess and feeling). For the record, I’'m not trying to pick on things, I’m trying to understand this code and learn. Thank You.
1.b.
You didn’t understand me here. I don’t want two sidebars at a time. But I want to assign sidebars to certain “sections” of the site with rules more precise than those available in backend. To clarify:
- I want sidebar X to be used on all Archives, Search and Blog.
- I want sidebar Y to be used on all Single Posts.
- I want sidebar Z to be used on forums (this one is just made up, just to show my point).
Current backend only allows me to assign sidebars on per-post or per-tag basis which is a no-go since both posts and tags base will grow exponentially with time.
2.a.
I am using Ethos and there is no searched term shown there at all, only “Search Results”. Thanks for pointing me to the one in Integrity. I feel stupid now for not checking other stacks in the first place.
2.b.
It’s more complicated here. I don’t want to change just title but entire content. As of now it looks like this for search results:
Nothing to Show Right Now
It appears whatever you were looking for is no longer here or perhaps wasn’t here to begin with. You might want to try starting over from the homepage to see if you can find what you’re after from there.
…and looks like this for 404:
Oops!
The page you are looking for is no longer here, or never existed in the first place (bummer). You can try searching for what you are looking for using the form below. If that still doesn’t provide the results you are looking for, you can always start over from the home page.
Landmark file only contains “Oops!” title for the 404, not the content. And it doesn’t contain anything at all regarding failed search results page. I want to edit all of the above, both landmark titles, content titles and content itself.