Site logo

[Support request] Display Search Results on same page without page refresh

Home Forums Support [Support request] Display Search Results on same page without page refresh

Home Forums Support Display Search Results on same page without page refresh

Viewing 15 posts - 16 through 30 (of 35 total)
  • Author
    Posts
  • #705326
    Tom
    Lead Developer
    Lead Developer

    Give this a shot:

    .masonry-container {
        padding-top: 4px;
    }
    #705444
    bluebit

    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:

    #705502
    Tom
    Lead Developer
    Lead Developer

    You 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.

    #705555
    bluebit

    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?

    #705565
    Tom
    Lead Developer
    Lead Developer

    Try changing:

    .masonry-container {
        padding-top: 4px;
    }

    To:

    .masonry-container {
        padding: 4px;
    }
    #705741
    bluebit

    It moved all the images to the left side 🙁 but it did add padding, look:

    #705971
    Tom
    Lead Developer
    Lead Developer

    That’s strange.

    I suppose you could try this instead:

    .search-results .site-main {
        padding: 4px;
    }
    #705999
    bluebit

    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.

    #706200
    Tom
    Lead Developer
    Lead Developer

    Can you try removing this CSS?:

    .masonry-container {
        padding: 4px;
    }
    #706301
    bluebit

    that fixed the layout, but in between the images there is no padding/gutter:

    #706579
    Tom
    Lead Developer
    Lead Developer

    So instead of using the Layout Element to make it full width, try using this CSS:

    .search-results .site.container {
        max-width: 100%;
    }
    #706681
    bluebit

    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:

    #706815
    Tom
    Lead Developer
    Lead Developer

    You 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?

    #707156
    bluebit

    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%;
    }

    #707482
    Tom
    Lead Developer
    Lead Developer

    You 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?

Viewing 15 posts - 16 through 30 (of 35 total)
  • You must be logged in to reply to this topic.