Search settings

Hi

When I use Search icon , it show me the blog post with no images , but I don't why it shows randomly ! I want to arrange it from last post to first I mean Descending

How to do that ?

Comments

  • Hello,

    Betheme is using basic WP searching functionality, and we did not interfere in it.

    If you would like to change it, you will have to modify the WP files or use some third-party plugin.


    Best regards

  • Hi,

    I knew that but I have question ,

    We published our news with current date and time !

    now when we search some news with title , it shows news with random dats !!!

    Last night I installed Jet-Search plugin that works with elementor and with that , the search was correct.

    1.do you have any recommendation?

    2.by default WordPress search item work in ascending or descending?

  • 1) Sorry, but we did not test any searching plugin, and I cannot recommend any.

    2) The default WordPress search sort the display in chronological order from the most recent to the oldest.


    Best regards

  • Hi

    The default WordPress search sort the display in chronological order from the most recent to the oldest.

    In my betheme and website , it shows Random , not most recent to the oldest and I want to work just like what you said.

  • Can you send me a link to your website so that I could take a closer look at it, please?


    Thanks

  • You Have that link already, but I just hid the search Icon and you should use

    ?s=

    at the end of url to see the search

    I will send you private information in ticket , Please cheek that too.

    Thanks

  • Please cheek your email.

    Thanks

  • You Have that link already, but I just hid the search Icon and you should use

    Sorry, but every day I visit multiple websites and get many messages with links, and it is hard to remember or find a particular URL for a particular customer. Also, people often have more than one website.

    But thanks for sending it in through the private message. ?

    1) Please check the following link, and try to modify the search result with tips from there.

    https://developer.wordpress.org/reference/classes/wp_query/

    2) To remove the subheader, please, use the following code:

    .search-results #Subheader{
       display: none!important;
    }
    

    Thanks

  • Thanks for that link , it's to hard for me to solve it by myself , and It will tack to much time for me , but will see that.

    Did you saw the problem in search ? In future will you fix that?

  • I couldn't understand what do you mean about that link of wordpress , Did you mean I have to change the code of search.php or should use the snippets in my function.php?

  • edited June 2021
    add_action('pre_get_posts', function($q) {
      
      if(!is_admin() && $q->is_search() && $q->is_main_query()) {
        
        $q->set('order', 'DESC');
        $q->set('orderby', 'date');
        
      }
      
    }, PHP_INT_MAX);
    

    This code work.

    Would you please add it to theme?

  • Yes, I saw it, but it is hard for me to investigate it properly because of the language.

    I will reproduce it in my environment and do some testing with it.

    I meant that you can try to edit the search.php file.


    Thanks

  • Would you like I change the language just for a while that you can test it?

  • If you could, I would be grateful.

    It will be more clear to me.


    Thanks

  • Fine,

    Are you ready to tack look closer?

  • edited June 2021

    Now you can do it on our subdomain, It's ready for you.

    the address is : oldnews .our address yesterday I sent you/wp-admin


    Thanks

  • I have tested it on my environment, and there is no longer a need to change the language. Thanks.

    I have a couple of posts with different publish dates and search for a keyword that is used in most of them. Both in Betheme and Twenty Twenty theme search result page displayed posts in the same order.

    You can test it on your own and see that Betheme does not affect searching at all. As this feature is only WP functionality, unfortunately, I cannot really help you.

    You can also check the following link on how to improve the searching on the website.

    https://yoast.com/wordpress-search/


    Best regards

  • Hi

    I want to purchase this plugin for search : ajax-search-pro-for-wordpress-live-search-plugin

    I ask them is that work with betheme and this is their answer :

    Hi,

    I assume they use an icon, which opens some sort of a pop-up or pop-down search in a container? If yes, then it could very likely work. If you set our search to override the default theme search, then by clicking on the icon, instead of the Be search bar, ours should show up.

    Best regards,

    Ernest Marcinko

    https://codecanyon.net/item/ajax-search-pro-for-wordpress-live-search-plugin/3357410

    Is it work with our theme?

  • Unfortunately, we did not test this plugin, and we do not know how it will behave with our theme.

    If you want, you can test it, but I cannot guarantee that it will work and if it will work with the future Betheme updates.


    Best regards

Sign In or Register to comment.