Support › Meta Box Builder › Using a PHP function in Query Args in Builder?Resolved
I'm trying to filter a taxonomy in builder to only display taxonomies with a certain value.
If I type it in manually, it works fine, ie
Query Args with a key of slug and a value of test, shows me the taxonomy with the slug called test.
Is there a way to run a PHP function in the value? ie, one that runs echo "test"; in this case ?
I was going to generate the PHP code and do it there, but when I press Generate PHP Code it just hangs forever. There are no errors in the php logs.
Any advice please?
The option Query args in the Builder does not support passing a callback function. You will need to use the PHP code to assign a PHP function to an argument.
Please follow the sample code here https://docs.metabox.io/fields/taxonomy/#limit-the-number-of-terms-for-pagination
Ah ok, thanks. Any idea why the PHP Generation is hanging please?
Please open the Console tab of the Inspect tool and check if there is an error message. Get more details on the Debugging Information step here https://support.metabox.io/topic/how-to-create-a-new-topic/