Is there any way to save a default mobile layout for each grid? I know that I can save default gutter widths and so on, but I would like for each grid layout to be stacked on mobile. Right now I must click the mobile button in the grid and then apply the stack layout. It's easy to forget, and in my case something that I would prefer if it would be applied automatically unless set to something else.
Would this be something to implement?
Is there any way of only showing a grid if it's filled with content? I'm settings up the pages so that you either can choose to simply put the content in the content editor OR choose to create a grid with LayGridder – or both. I'm showing the grid in the
<?php the_laygrid($id, $type); ?>.
But at the moment, an empty div for LayGridder is displayed regardless of if the grid has any content or not, which affects the layout a bit since the empty div is taking up a bit of space.
So I'm wondering if there's any technique that you can use to see if the grid has any content and then conditionally output the markup for it depending on that boolean?
I get the same error kind of randomly though when only updating the content of the post or the title. And I experienced this even before installing ACF and adding the custom fields to the post type.
- Yes, the attachment ID of this affected featured image is 34.
- I'm right now only using the Color Selector field, so not relevant to the featured image.
- I'm using Laygridder 1.1.5 and Wordpress 5.1.1.
Now I seem to get this error every time I update a post. I just added a ACF field to the post type and I'm going through each post and putting stuff in the fields. For each post that I update, the featured image disappears from the grid. Like before, I have to either double click the post caption in the grid and just click "OK" in order for the image to show, or add the post thumbnail again as a new instance.
The JSON output is to big to put here, but I did some comparison of the the outputs, before and after the update of a specific post, and found that when I update the post, it's replacing the
contproperty with the attachment ID, instead of the image URL that was there before. This is the only difference I found when comparing the two JSON outputs.
This is how it looked before I updated the post (on that specific post in the JSON data):
And this is how it looks after updating:
This leads to a value of
nullin the JSON on
sizes, which explains why the featured image isn't showing. So there must be something in the code that puts an ID of the attachment instead of the URL. I'm not sure why I didn't experience this when recently updating the featured image itself though. Right now it seems to affect the featured image data when I update anything else (i. e. the title and the ACF fields, maybe any field).
Thanks for sending us this Bug Report.
Can you replicate that? Please send me the Gridder JSON of the Post with broken grid (before and after you change the featured image).
Hmm. It seems to be working now. I'm not sure why it didn't work before. I've tried with both uploading a new featured image and replacing with that, and selecting an already uploaded featured image - and both worked. Any ideas why it didn't work before?
EDIT: I got the same problem just now only by changing the title of the post connected to the post thumbnail – not changing the thumbnail itself at all. The caption is there like it should, but the image is gone. I can click the caption and then just click "OK" to bring back the thumbnail, as the grid seems to understand what post I'm referring to, but still not being able to show the featured image until I either just double click and press "OK" or add a new post thumbnail.
Unfortunately, as the problem seems to occur randomly (I have at least not yet noticed a pattern), it's a bit hard for me to replicate and give you the JSON data at the moment.
I noticed recently that when applying a top margin for example on one item in the grid, the visual margin varies greatly from the way it looks in the backend to the frontend. Genreally the distance is a lot greater on front end than it is on the backend. I can bring more information when I actually have the site in front of me (I'm not at my work computer right now), but I just wanted to check with you to see if this is a common problem and if there are some ways to avoid this?
I haven't modified the CSS of the grid items or anything. I'm applying the grid to a child theme of the Blankslate theme, but I haven't modified the CSS for Blankslate or the LayGridder plugin at all.