Tag: conditional tags
How to Use WordPress Conditional Tags
One of the most straightforward, dependable, and useful things in WordPress is what the Codex calls “Conditional Tags.” In her interview for Up and Running, Helen Hou-Sandí said WordPress conditional tags were her favorite WordPress functions for their simplicity and ease of use — they read just like English. We agree with her on that. They’re great. To explain them to you in more depth, we’re sharing a chapter of Up and Running here on WPShout. Let’s get to business understanding conditional tags in WordPress!
Adding an is_product_subcategory() Conditional Tag to WooCommerce
I’ve got a project that needs to treat WooCommerce category pages differently from its subcategory pages. Both use taxonomy-product_cat.php, though. What I’d really love to do is change just the search field in that template, depending on whether a particular page is showing a top-level category or a subcategory.