I'm using MixItUp and having this issue. I'm calling the filters like this:

$categories=  get_categories('child_of=14&hide_empty=0');
foreach ($categories as $category)
    echo '<li class="filter" data-filter="'.$category->category_nicename.'"><span>'.$category->cat_name.'</span></li>';

it works fine, all categories are showing with their respective data filter, just as expected.

However, when I try to output the content for those categories, I get nothing at all, not even errors, just blank. This is the code I'm using:

<li class="mix <?php foreach(get_the_category() as $category) { echo $category->slug . ' ';} ?>">
<?php the_post_thumbnail('prod_th'); ?>

Just in case, teh code works fine in pure HTML5, so I guess I'm doing something wrong in PHP or maybe forgetting something

Any idea on what am I doing wrong?

Thanx in advance :)

Fore reference, I'm using this: http://kune.fr/javascript/tutoriel-integreez-mixitup-a-wordpress/

  • Are there any error messages, especially with WP_DEBUG enabled? What does dumping get_the_category() give you? – Rarst Dec 20 '13 at 23:34
  • no, nothing, in debug.log I only get this: [20-Dec-2013 23:46:41] PHP Notice: Undefined variable: website in mysite//wp-content/themes/mytheme/404.php on line 37 but I didn't work on 404.php yet, so it's OK – Devin Dec 20 '13 at 23:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.