Hot answers tagged

1

I would divide your question into two parts: Use the query parameters as default for the filter on page load. Update the query parameters dynamically when the form values change. To achieve 1. you'll first need to extract the logic to build $args in property_filters() so it can be used on the initial load: function prepare_property_filters(array $args): ...


1

There is indeed a filter, walker_nav_menu_start_el will be able to handle it for you! Take this code for example: function wpse356896_filter_primary_nav_menu_dropdown( $item_output, $item, $depth, $args ) { // Only for our primary menu location. if ( empty( $args->theme_location ) || 'primary-menu' !== $args->theme_location ) { ...


Only top voted, non community-wiki answers of a minimum length are eligible