This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Category description instead of title WooCommerce product in search result

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Category description instead of title WooCommerce product in search result

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #30512
    Levi93Levi93
    Participant

    Hello!

    When searching i want to display the products and the product categories, this sort of works.
    The problem i’m running in to is that, instead of displaying the title of the category, it displays the description. So when a category doesn’t have a description the search result will be an empty block (it is there but without any text) and when it does have a description it shows that but not the title of the category. Is this some sort of setting that has to be turned on that i’m missing or is this the normal behaviour?

    Best,

    Levi

    • This topic was modified 5 years, 5 months ago by Levi93Levi93.
    #30551
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    I am not sure, but from the screenshots I am suspecting that the result titles are either removed via custom code, or they are hidden via a custom CSS code, or by some sort of a styling conflict.
    Can I take a look at this somewhere? I might be able to tell by trying it. I suspect it is a custom style, which hides h3 titles via custom CSS or something similar.

    #30562
    Levi93Levi93
    Participant

    You cannot access this content.

    #30564
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    I found, that there is a customization of the plugin results template files within the theme folder: https://i.imgur.com/43zbpWT.png

    I recommend reverting the changes to the original file, or trying to make a change to that template file, to account for the empty titles, something like:

    <?php echo !empty( get_field('woocommerce_intern_modelname',$r->id) ) ? get_field('woocommerce_intern_modelname',$r->id) : $r->title; ?>

    Please consult with the developer who made the changes as well, to make sure it works correctly.

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