fix for PW2.4 pagination not working with has_parent=/path/

remove some selectors when empty