Support › MB Views › How to limit search to a specific categoryResolved
In a MB view I want to add a search box that only searches posts in a specific category. Now I've managed to add the search box via
Is there a way to add additional code in Twig to limit this function to search for posts of only a specific category? I've found php code, but I would like to add it in the MB view, so in Twig code.
Kind regards, Henri
Twig is using for creating templates, so there are some limitations if you try to create some logical code like PHP. You can just create a PHP function then call it in the View to show the value.
Thanks for answer. I was hoping not to have to write PHP 😉
For now I've found a workaround with the plugin Ivory Search. That works for now using a sidebar.