WP-3161: Fix pathauto by hiding elements correctly.