Filter category in WooCommerce shop page to display related sub-category

According to your description I’m assuming your each product has a category named Designers and designer-name subcategory under Designers category. In that case the following CODE will work for you (read the comments within the CODE for explanation): function wc_shop_product_sub_category() { // get the category object for “designers” category $designers_category = get_term_by( ‘name’, ‘designers’, ‘product_cat’ … Read more

where to apply “apply filters” and other Sanitization Functions

I use these commands at the top of my functions.php in all child themes; it will sanitize all POST/GETs. Maybe there are better ways (and it might be redundant), but it appears to work for me. $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING); $_GET = filter_input_array(INPUT_GET, FILTER_SANITIZE_STRING); But I am open to constructive criticism….

Overwrite default WordPress wording

You can filter ‘gettext’. Sample code, not tested: add_filter( ‘gettext’, ‘wpse_65085_change_error_messages’, 10, 3 ); function wpse_65085_change_error_messages( $translated, $text, domain ) { if ( ‘default’ !== $domain ) { return $translated; } switch( $text ) { case ‘Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case … Read more