Breaking frontpage category names on ( character.
authorLaury GvR <laury@gaslightmedia.com>
Fri, 19 Jan 2018 17:45:26 +0000 (12:45 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Fri, 19 Jan 2018 17:45:26 +0000 (12:45 -0500)
This is necessary because wordpress strips out br tags one tries to
put in the category names (unlike with appearance>menus).

sections/front-page.php

index d749f22..d5d2094 100644 (file)
@@ -61,7 +61,8 @@
                         </div>
                         <div class="front-product-content-container">
                             <?php
-                            echo '<h4><a href="' . get_term_link( $product_category ) . '">' . $product_category->name . '</a></h4>';
+                            $cat_name = str_replace("(","<br/>(",$product_category->name);
+                            echo '<h4><a href="' . get_term_link( $product_category ) . '">' . $cat_name . '</a></h4>';
                             $args = array(
                                 'posts_per_page' => -1,
                                 'tax_query' => array(