Site logo

[Resolved] Search results page translation and categories

Home Forums Support [Resolved] Search results page translation and categories

Home Forums Support Search results page translation and categories

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #643193
    Zuzana

    Hello!

    I have a Slovak website https://interweld.sitestart.sk/ and therefore I would need that all text, especially the one in Search Results Page and 404 Page is showing the Slovak translations. I checked the translation progress of the GP files and all the words which I would need are already translated (marked green). Also, the language of my website in Dashboard is set to be Slovak. And the strings are still shown in English. Can you help me to solve this issue, please? (If you use search now, it will show you the title in Slovak but this is just a quick CSS hack, it is by far not the ideal solution.)

    I have a Woocommerce installed on my website. Another thing I would like to ask, why am I not seeing the categories pages in the search results, please?

    And when I search for a product, is it possible that the short description of the product has only some certain amount of characters, not its whole length? Limiting the number of characters in the Customizer settings in Blog section only worked for pages, not for products.

    Thank you very much in advance for your reply!

    Zuzana

    #643381
    Zuzana

    Update: I managed to solve the translations using Loco Translate plugin.

    I would be still very happy if you could help me regarding showing categories and products in the search results page.

    Thank you!
    Zuzana

    #643727
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You might be able to use a plugin like this to search in categories as well: https://wordpress.org/plugins/wp-extended-search/

    As for the products, you only want to show an excerpt of the short description while browsing search results (nowhere else)?

    #643886
    Zuzana

    Hi Tom,

    thank you very much for the plugin recommendation!

    And yes, product excerpt is an issue only in the search results page, everywhere else it is already set up to work how we wanted it.

    #644327
    Tom
    Lead Developer
    Lead Developer

    I wonder if you could use a function like this:

    add_filter('woocommerce_short_description', function($post_excerpt) {
        if ( is_search() ) {
            $post_excerpt = substr( $post_excerpt, 0, 10 );
        }
    
        return $post_excerpt;
    } );

    Let me know 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.