Infinite Scroll appending Next Product Category Term pages

I discovered Infinite Scroll has an updateurl function: var nextURL; function updateNextURL( doc ) { nextURL = $( doc ).find(‘.tax-pages a.next’).attr(‘href’); } // get initial nextURL updateNextURL( document ); // init Infinite Scroll var $container = $(‘#main’).infiniteScroll({ // use function to set custom URLs path: function() { return nextURL; }, hideNav: “.tax-pages”, append: “#main ul.products”, … Read more

How do I make my terms for each product display via foreach loop? (woocommerce)

The problem is here: while ( $query->have_posts() ) { $query->the_post(); function filter_categories($categories) { foreach ($categories as $category) { echo $category->name; } } You shouldn’t declare a function inside a loop. Every time it loops around the filter_categories function gets declared again, but named functions can only be declared once, so it crashes the second time … Read more

MySQL-inserted custom taxonomy term lead to 404, flush rewrites doesn’t help

EUREKA! My taxonomy name is ‘store-category’. When i used ‘rewrite’ = true or ‘rewrite’ = array(‘slug’ => ‘category’) it was giving me a 404 error. When I changed it to ‘rewrite’ => array(‘slug’ => ‘group’) the problem just went away! So, the problem turned out to be a rewrite conflict. WordPress had been looking for … Read more