Changing display format search.php

Forums Forums SwiftThemes Support Changing display format search.php

This topic contains 9 replies, has 2 voices, and was last updated by  Art Munson 1 year, 8 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #34801

    Art Munson
    Member

    Any tips on how to change the display results in search.php Satish?

    I would like the search return results to display as the tag or category widgets or the posts on the home page.

    I tried to upload images but the “Upload Images” button is not working for me in Firefox or Chrome.

    • This topic was modified 1 year, 8 months ago by  Art Munson.
    #34809

    Satish Gandham
    Keymaster

    In design options layout options set archive layout to your liking.

    #34812

    Art Munson
    Member

    Hi Satish,

    Thanks for the reply but none of those options duplicate the display I’m looking for. I wish I could get the Upload Image button here to work so I could show you what I mean.

    If you search by tags or, select a category, at https://tunegorila.com you will see the search results display I would like. If you use the search box it returns the search display results I do not want.

    Can I just take a copy of page.php and rename it search.php?

    Thank you for any help.

    #34813

    Art Munson
    Member

    Hi Satish,

    Continuing to look at search.php and I think the section need modified is this:

    
    <?php
               while (have_posts()) : the_post();
                        get_template_part($layout, get_post_format());
               endwhile;
    ?>
    

    Am I on the right track?

    • This reply was modified 1 year, 8 months ago by  Art Munson.
    • This reply was modified 1 year, 8 months ago by  Art Munson.
    • This reply was modified 1 year, 8 months ago by  Art Munson.
    #34837

    Satish Gandham
    Keymaster

    I’m unable to understand your question because what you are asking for is the default behaviour.

    Upload image is working now. Please share the images.

    #34847

    Art Munson
    Member

    Hi Satish,

    Attached are the images. As you can see the display of a “search box” result is different than the display of a tag or category search.

    #34849

    Satish Gandham
    Keymaster

    In swift/template_parts/blog.php line 30 change

        if ((!$full_length) && (is_search() || isset($swift_options['excerpts_enable']) && $swift_options['excerpts_enable'])) : // Only display Excerpts for Search
    

    to

    
        if ((!$full_length) && ( isset($swift_options['excerpts_enable']) && $swift_options['excerpts_enable'])) : // Only display Excerpts for Search
    
    
    #34851

    Art Munson
    Member

    Hi Satish,

    So close! Just about perfect except at the top of the search results the following is displayed echo "main ";

    #34852

    Art Munson
    Member

    Never mind, something I did. Sorry.

    #34853

    Art Munson
    Member

    All good now Satish. Thanks so much for your excellent support!

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.