This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Show "Search" Results in Post Grid Layout

  • Creator
    Topic
  • #5904
    darkecho
    Participant

    Is there any way to show the Search Results or Category/Tag Archives in Post Grid instead of Post List?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #5918
    Jason Bobich
    Keymaster

    Hello,

    No, I’m sorry but there is no feature for this. You’d have to completely re-tool the search.php template file form your Child theme.

    #5920
    darkecho
    Participant

    Hello,

    Thanks for the reply, that’s what I had in mind, actually I have my home page show up on Post Grid style and for the reason that I would like to have consistency I would like to show the search results, or categories/tags (http://www.example.com/tag/samplename/ or http://www.example.com/category/samplename/) as a post grid.

    Is it too complicated to change for instance the search results and make it similar to the template-grid.php so ita can get the results and show it up in post grid layout?

    Thanks!

    #5921
    Jason Bobich
    Keymaster

    Sure you could do that. Take a stab at it. I’d say using template_grid.php would be a good reference if this is a customization you want to do.

    You could essentially copy the loop, I think, from template_grid.php. You don’t have to worry about query_posts obviously because this is a search results page where the loop is already set. So, that means you can avoid all the stuff at the top of the template involving setting up a query. You still need to take into account setting up your $columns, $size, and $posts_per_page (which should match whatever you have set at Settings > Reading > blog posts to show at most) parameters.

    #5922
    darkecho
    Participant

    Okey, I will definitely give it a try, thanks! Could you please tell which files (.php) are for the categories and tags results so I can check between them and figure it out easier?

    Thanks

    #5926
    Jason Bobich
    Keymaster

    These are all archive.php, which should be setup by default similarly to search.php.

    #5953
    darkecho
    Participant

    I worked it out, thanks a lot!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The forum ‘Swagger Responsive WordPress Theme’ is closed to new topics and replies.