- This topic has 34 replies, 2 voices, and was last updated 7 years, 7 months ago by
bluebit.
-
AuthorPosts
-
October 19, 2018 at 11:37 am #705326
Tom
Lead DeveloperLead DeveloperGive this a shot:
.masonry-container { padding-top: 4px; }October 19, 2018 at 3:05 pm #705444bluebit
nice it worked, thank you 🙂
Do you know how i can make search results page fullwidth, eliminate the left and right side white spaces?
Example Search Results page:
October 19, 2018 at 5:06 pm #705502Tom
Lead DeveloperLead DeveloperYou can create a new Layout Element in “Appearance > Elements” (Elements module must be active), and set the “Container” tab to “Full Width”.
Then choose the search results in the Display Rules.
October 19, 2018 at 7:11 pm #705555bluebit
wow cool, i never knew about layout, i just did changed it to full width but doing so removed the left and right padding, look:
how do i get the left and right padding back?
October 19, 2018 at 7:47 pm #705565Tom
Lead DeveloperLead DeveloperTry changing:
.masonry-container { padding-top: 4px; }To:
.masonry-container { padding: 4px; }October 20, 2018 at 5:11 am #705741bluebit
It moved all the images to the left side 🙁 but it did add padding, look:
October 20, 2018 at 9:53 am #705971Tom
Lead DeveloperLead DeveloperThat’s strange.
I suppose you could try this instead:
.search-results .site-main { padding: 4px; }October 20, 2018 at 10:36 am #705999bluebit
I added the code but it didn’t do anything, here is all the code im using:
.search-results .page-header,
.search-results .entry-header,
.search-results .entry-summary {
display: none;
}.search-results .inside-article {
padding-top: 0px;
padding-left: 4px;
padding-right: 4px;
padding-bottom: 0px;
}.post-image {
margin-top: 0px;
}
@media (max-width: 1024px) and (min-width: 768px) {
.generate-columns,
.grid-sizer {
width:25%
}
}.masonry-container {
padding: 4px;
}.search-results .site-main {
padding: 4px;
}Maybe fullwidth makes it that there is only 1 row? Do we need to add rows? On mobile it looks weird too.
October 20, 2018 at 9:45 pm #706200Tom
Lead DeveloperLead DeveloperCan you try removing this CSS?:
.masonry-container { padding: 4px; }October 21, 2018 at 4:11 am #706301bluebit
that fixed the layout, but in between the images there is no padding/gutter:
October 21, 2018 at 9:33 am #706579Tom
Lead DeveloperLead DeveloperSo instead of using the Layout Element to make it full width, try using this CSS:
.search-results .site.container { max-width: 100%; }October 21, 2018 at 12:17 pm #706681bluebit
Nice, it worked:
Lastly, how an I use this exact layout on the homepage?
Currently if you click on my logo image, it takes you to the homepage and also when the “all” tag is clicked on that’s underneath the searchbar it shows all the images on the website. Currently, I have the “all” tag connected to a category page, that way I can put connected all the images to the “all” category without having people see an “all” tag on product pages. That’s why I created the “all” category page, so I can have a way to organize all the images in a single ALL category.
Do I put the ‘all” category page on the homepage? Im still trying to figure out how to do it.
Basically I want the homepage to show all my sites images with this layout we just made:
October 21, 2018 at 6:11 pm #706815Tom
Lead DeveloperLead DeveloperYou could set your home page to be the posts page in “Settings > Reading”.
However, we’ll need to adjust some of the code we used.
Can you share the complete solution we came up with so I can tweak it?
October 22, 2018 at 6:36 am #707156bluebit
I just set homepage to latest posts page.
I believe this is all we used, just custom css to change the search results page:
.search-results .page-header,
.search-results .entry-header,
.search-results .entry-summary {
display: none;
}.search-results .inside-article {
padding-top: 0px;
padding-left: 4px;
padding-right: 4px;
padding-bottom: 0px;}
.post-image {
margin-top: 0px;}
@media (max-width: 1024px) and (min-width: 768px) {
.generate-columns,
.grid-sizer {
width:33.3333333333%
}
}.search-results .site-main {
padding-top: 8px;
padding-left: 4px;
padding-right: 4px;
padding-bottom: 0px;}
.search-results .site.container {
max-width: 100%;
}October 22, 2018 at 10:37 am #707482Tom
Lead DeveloperLead DeveloperYou would do this instead:
.search-results .page-header, .search-results .entry-header, .search-results .entry-summary, .blog .page-header, .blog .entry-header, .blog .entry-summary, .archive .page-header, .archive .entry-header, .archive .entry-summary { display: none; } .search-results .inside-article, .blog .inside-article, .archive .inside-article { padding-top: 0px; padding-left: 4px; padding-right: 4px; padding-bottom: 0px; } .post-image { margin-top: 0px; } @media (max-width: 1024px) and (min-width: 768px) { .generate-columns, .grid-sizer { width:33.3333333333% } } .search-results .site-main, .blog .site-main, .archive .site-main { padding-top: 8px; padding-left: 4px; padding-right: 4px; padding-bottom: 0px; } .search-results .site.container, .blog .site.container, .archive .site.container { max-width: 100%; }However, I’m not seeing any posts on the home page at all?
-
AuthorPosts
- You must be logged in to reply to this topic.