How to customize popular categories in the full-width search

This topic has 6 replies, 4 voices, and was last updated 4 years, 9 months ago ago by Olga Barlow

  • Avatar: Julien
    Julien
    Participant
    February 23, 2021 at 19:30

    Hi,

    I am using full width search and would like to customize the popular categories shown.
    In this file : wp-content/plugins/et-core-plugin/app/models/customizer/templates/header/parts/search.php
    I see the call to the shorcode do_shortcode(‘[product_categories columns="6" limit="6"]‘);
    How I can customize the categories called like that for example [product_categories ids="1,2,3,4,5,6" columns="6" limit="6"]‘); without modifying the core/native plugin ?

    Is there a way to do it ? override plugin ?

    Regards,

    5 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    February 24, 2021 at 09:45

    Hello,

    Thanks for the request.
    It will be added in one of next updates.

    Regards

    Avatar: Julien
    Julien
    Participant
    February 24, 2021 at 15:51

    OK … what do you think is the best solution for me to customize these categories?
    Override the file and be vigilant during updates so as not to lose my changes?

    Avatar: Muhammad Zaki
    Muhammad Zaki
    Participant
    February 24, 2021 at 19:57

    Hello!

    To achieve your requirement you will have to use the child theme and override the file. Then the updates will not lose any theme changes.

    If you want me to create a child theme for you please allow me.
    Thank you!

    Avatar: Julien
    Julien
    Participant
    February 24, 2021 at 21:28

    Thanks for your reply.
    The original file being here :
    wp-content/plugins/et-core-plugin/app/models/customizer/templates/header/parts/search.php
    I tried to override the file here :
    wp-content/themes/xstore-child/et-core-plugin/app/models/customizer/templates/header/parts/search.php
    and here :
    wp-content/themes/xstore-child/plugins/et-core-plugin/app/models/customizer/templates/header/parts/search.php
    but the file is ignored.
    As this is a plugin file (and not the theme), how can we overload it ?

    Avatar: Olga Barlow
    Olga Barlow
    Participant
    February 25, 2021 at 14:28

    Hello,

    You can’t change plugin code using child theme. You will lose your changes after update. That’s why it would better to wait for the next theme update where we’ll implement option to choose what categories to display there.

    Regards

  • Viewing 6 results - 1 through 6 (of 6 total)

The issue related to '‘How to customize popular categories in the full-width search’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.