Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • #702512

    Hi

    I have checked the forum for this and the one answer I found didn’t work for me.

    I want to display search results as a grid in a similar style to Portfolio grid. Preferably with thumbnail, title and excerpt.

    Can you help?

    The site is at http://www.dominicrutterford.co.uk/the-collection/

    #703421

    Hey domchocolate,

    Please refer to this post – https://kriesi.at/support/topic/grid-style-search-results-with-sidebar/

    Please feel free to request – or vote if already requested – such feature on Enfold feature request form.

    Best regards,
    Yigit

    #703469

    OK I have it working but is there a way of making it use the Portfolio grid layout, 4 columns, image width set to automatic? So that it looks like this:- http://www.dominicrutterford.co.uk/the-collection/ rather than http://www.dominicrutterford.co.uk/?s=Dinar??

    Thanks in advance

    Dominic

    #703780

    Hi,

    Please edit your code and find following line

     'columns' => 4,
    

    and change it to

     'columns' => 5,
    

    Best regards,
    Yigit

    #703947

    Hi

    That changes the columns to 5 which is fine but it does not display the results the same as http://www.dominicrutterford.co.uk/the-collection/.

    http://www.dominicrutterford.co.uk/the-collection/ displays as a portfolio grid, 5 columns with image size set to automatic.

    The search results are displaying with the images much smaller and the spaces between much wider.

    How can I do this in search results?

    Here is my code:

    <?php
                        if(!empty($_GET['s']))
    			{
    				echo "<h4 class='extra-mini-title widgettitle'>{$results}</h4>";
    
    				global $posts;
    				$post_ids = array();
    				foreach($posts as $post) $post_ids[] = $post->ID;
    
    						$atts = array(
    						'type' => 'grid',
    						'items' => get_option('posts_per_page'),
    						'columns' => 5,
    						'class' => 'avia-builder-el-no-sibling',
    						'paginate' => 'yes',
    						'use_main_query_pagination' => 'yes',
    						'thumbnail' => 'portfolio',
    						'custom_query' => array( 'post__in'=>$post_ids, 'post_type'=>get_post_types() )
    				);
    
    				$blog = new avia_post_slider($atts);
    				$blog->query_entries();
    				echo "<div class='entry-content'>".$blog->html()."</div>";
    			}
    
                        ?>

    Best

    Dominic

    #703949

    PS search result can be found at http://www.dominicrutterford.co.uk/?s=Dinar

    #703986

    Hey!

    Please try adding following code to Quick CSS in Enfold theme options under General Sttyling tab

    .template-search .post-entry {
        margin-left: 1%;
        width: 19%;
    }
    .template-search .post-entry .first {
        margin-left: 0;
    }

    Cheers!
    Yigit

    #704009

    Hi Yigit

    I’m afraid that didn’t do anything to the page at all – page didn’t change at all. Even when I added !important:

    .template-search .post-entry {
        margin-left: 1%!important;
        width: 19%!important;
    }
    .template-search .post-entry .first {
        margin-left: 0!important;
    }

    I wonder whether it’s more to do with the image thumbnail size that’s being called and/or styled?

    Any thoughts or other ideas?

    D

    #704011

    BTW that CSS is being recognised when I check in Firebug. And if I use Firebug to force the images to be larger in the HTML it seems to correct the layout (although the images are pixelated because I am enlarging a portfolio-small image). I think we just need to find a way of calling the larger images and making them automatic.

    I did also try:
    'columns' => 'automatic',

    This called the right images but broke the grid layout so that they were all stacked on top of each other in one long column.

    Dominic

    #704012

    Hi!

    They show up fine on my end, attached a screenshot in private content field.

    Please flush browser cache and refresh your page a few times – http://wiki.scratch.mit.edu/wiki/Hard_Refresh

    Best regards,
    Yigit

    #704017

    Yes they show up but they are not working like http://www.dominicrutterford.co.uk/the-collection/.

    On http://www.dominicrutterford.co.uk/the-collection/ the margins stay the same fixed width and the images scale depending on screen width.

    On the latest http://www.dominicrutterford.co.uk/?s=Dinar the margins scale depending on screen width and the images stay the same.

    Please see screenshots:

    #704024

    I can do this in Firebug but it needs to call the larger image and not the small one. I just forced the image to 500px and gave it a max-width. See code in screenshot.

    #704028

    I think I’ve cracked it!

    .slide-image img {
    width: 100vw;
    }

    Do you see any issues with that?

    • This reply was modified 8 years, 1 month ago by domchocolate.
    #704030

    I spoke too soon. That code is working but the image being called is still too low-resolution. I need to be able to call a larger one.

    Dominic

    #704034

    Hey!

    Please add following code to Quick CSS in Enfold theme options under General Styling tab

    .search-results .container {
        padding: 0 10px;
    }

    Regards,
    Yigit

    #704037

    Have done – thanks. Although this doesn’t help my too low-res thumbnails/images being called.

    See attached and view at 100% (it’s less noticeable on smaller res screens such as laptops)

    D

    #704038

    Difference between the two is http://www.dominicrutterford.co.uk/the-collection/ calls

    <img class="attachment-medium size-medium wp-post-image"

    and search results calls

    <img class="attachment-portfolio_small size-portfolio_small wp-post-image"

    #704039

    Hi,

    Try the following:
    1. Install this plugin: https://wordpress.org/plugins/simple-image-sizes/
    2. Go to Settings > Media
    3. Change the portfolio_small image size (increase its width / height).
    4. Regenerate the thumbnails by clicking the button at the bottom.

    Best regards,
    Yigit

    #704046

    Brilliant – we’re there. Thanks for all of your help!

    #704052

    Hey!

    You are welcome!
    For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
    And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
    For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)

    Best regards,
    Yigit

Viewing 20 posts - 1 through 20 (of 20 total)
  • The topic ‘I want to display my search results in a grid’ is closed to new replies.