• Resolved techwpdrift

    (@techwpdrift)


    Hi, is it possible to override the code inside WalkerCheckbox? we want to keep the filter behaviour but change the categories and subcategories link to be directyle the category or subcategory link and not the wone with a ?parameter into the url

    We made so by changing the file /wp-content/plugins/filter-everything/src/Walkers/WalkerCheckbox.php adding the following https://i.ibb.co/yp9yK64/image.png

    But we want to keep changes in case the plugin get an update or so.
    If we can’t override WalkerCheckbox.php what can we do?
    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author stepasyuk

    (@stepasyuk)

    Hi @techwpdrift

    Thank you for using Filter Everything.

    Good question. Yes, sure – you can achieve your goal – to override few files and be able to update the plugin.

    1. You have to override checkbox.php template file in accordance with the Template Overriding feature built-in in the plugin.

    2. Create copy of the /wp-content/plugins/filter-everything/src/Walkers/WalkerCheckbox.php, call it for example ‘NewWalkerCheckbox.php’ include it and modify it in accordance with your requirements.

    3. Replace in your own checkbox.php file function flrt_walk_terms_tree(); with your own for example new_flrt_walk_terms_tree(); that contains your own NewWalkerCheckbox() instead of original. (of course you have to put your new_flrt_walk_terms_tree(); somewhere in functins.php or like that, but I’m sure you understand this)

    That’s all ??

    • This reply was modified 2 years, 4 months ago by stepasyuk.
    Thread Starter techwpdrift

    (@techwpdrift)

    Hi stepasyuk, sorry but i’m not quite sure what i should do. Can you please clarify more specifically, what should I do at each step?

    Thanks

    Thread Starter techwpdrift

    (@techwpdrift)

    @stepasyuk hello?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Override /src/Walkers/WalkerCheckbox.php’ is closed to new replies.