In addition to the above, when the page is set as the “blog” the custom theme I made disappears, but when I activate another page as the blog page, my customization appears again!
It has something to do with assigning the “blog page” posts page -> triggers old theme. When not applied -> new blog theme is shown.
-
This reply was modified 2 years ago by
ptrulli.
With the exception of parent/child themes, it’s impossible to apply styling from in inactive theme. The only reason it could appear to be so is if the old theme’s CSS files were cached somewhere. You said you purged server side caching and local cookies and history, but you didn’t mention local cache. Cache and history are not the same things.
Try clearing your browser’s cache and reloading the page. Or check the page from a different browser that had never loaded anything from your site. Or provide a link to your site so someone can check for you.
Hi there, excuse my ignorance, but the theme I am using is active, i.e. generatepass/blocks ?
Heres the page in question https://paolotrulli.com/blog/ please take a look, I’m really hoping to address this.
I’m not sure what you are seeing, but this is what I see:
View post on imgur.com
(just the “above the fold” portion, more content occurs below)
Looks OK? Certainly not like your OP screen shot. If you still see something different, it’s due to local browser caching. If you use Brave and how to clear the cache isn’t obvious, try searching the ‘net for “clear brave cache”. What you want to clear is the cache, not history or cookies. Although clearing cookies anyway isn’t a bad idea.
FYI: Usually if you’re logged into your site, caching of page content is usually disabled, but YMMV. Also, even if content is not cached, the associated CSS styling is often still locally cached, which can sometimes result in markedly different appearance.
Your current theme is GeneratePress, but it’s not a “block theme”. Block theme template files are .html type. GeneratePress’ templates are .php type, thus a “classic” theme. But classic themes can still make use of of the block editor (yeah, it’s confusing). What classic themes cannot do is utilize the new full site editor.
Hi again, my apologies the blog page was not assigned as the “posts page” in the homepage settings. I have assigned it now. You should see a different layout, which was included in my initial post.
When I “view” the blog page, it shows me the view I don’t want, which is 1 column and posts on top of each other. However, when I hit edit, it shows me the same as you saw earlier: the three-column row.
Strangely, the 3-column is from the generateblocks open pattern library; I would think it should work.
Issues
It’s not uncommon for editor views to differ from front end views. It’s not supposed to be that way, but it happens more often than it should 🙁 I’m not familiar with Generate Blocks, but I’d expect there to be a setting for the block where you’d explicitly set the desired column count. If you’re having difficulty with theme specific features I recommend seeking further assistance through the theme’s dedicated support forum.
Regardless of theme, certain layout issues can often be corrected with some custom CSS. For example, you might try adding the following to the Additional CSS customizer section:
.blog main {
display: flex;
}
.blog article {
flex: 33%;
padding: 20px;
}
You may adjust the numeric values as desired. Or add other CSS to further modify theme defaults.
Got this sorted out. I’ll post the resolution which was provided in generatepress support in case other comes across this.
“Blog page is an index page, editing the page > blog does not edit the actual blog index page.
Try this:
1. Go to appearance > elements, create a block element, and set the element type to Loop template.
https://docs.generatepress.com/article/block-element-loop-template/
2. Copy all content from your current blog page, and paste it into the element.
Here’s a video instruction
3. Select the query loop block, and remove all parameters except posts per page and post type, toggle the Inherit Query From Template option.
https://docs.generateblocks.com/article/query-loop-overview/#query-parameters
4. Set the element location to blog and publish the element.”