• Resolved jakzodiac

    (@jakzodiac)


    I am having issues displaying different category sliders on different pages. It seems to always default to all of them.

    I’m using WordPress 4.1 and I’ve gone into the code. If I manually assign a category in the cptbc_shortcode function it will work, but it doesn’t seem to pull the category from the $atts.

    Any thoughts?

    https://wordpress.org/plugins/cpt-bootstrap-carousel/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Phil Ewels

    (@tallphil)

    Hi jakzodiac,

    I’m not sure why this isn’t working for you, to be honest this kind of thing is difficult to debug without being able to sit down on your computer myself 🙂

    I’d recommend trying out the beta code for the new version, which has quite a few updates: https://github.com/ewels/cpt-bootstrap-carousel

    I really must get around to releasing this soon. Let me know if it helps..

    Phil

    Thread Starter jakzodiac

    (@jakzodiac)

    That one doesn’t seem to do it either. I have a dev site setup. If you wouldn’t mind emailing me I will send you the details. You can email me at davidb@quazar.me.

    That would be a huge help. Nothing looks wrong with the code. It actually makes perfect sense. No idea why the beta isn’t working though.

    Plugin Author Phil Ewels

    (@tallphil)

    Resolved by e-mail.

    Hi Phil Ewels,

    We’re getting the same issue “I am having issues displaying different category sliders on different pages. It seems to always default to all of them.”

    Page is here – http://hallsgb.com/fine-art/

    I noticed you guys resolved it via email. Please can you take a look and let me know how to solve the issue? My email is andy@factorypattern.co.uk

    Many thanks,
    Andy

    Plugin Author Phil Ewels

    (@tallphil)

    Hi Andy,

    The poster above managed to resolve the issue himself in the end:

    Resolved. It was the loop that generated the menu that was an issue. It was forcing the slider to use the very last page title as a category.

    Does that help at all? I’m not able to replicate the problem, so there’s a good chance that it could be something to do with other WordPress loops elsewhere in your theme.. If you’re able to replicate the problem in another setting (eg. the Unite theme), let me know.

    Phil

    I managed to resolve this for @factorysketcher by updating line 43 in the file cptbc-frontend.php to this:

    $args['tax_query'][] = array(
    	"taxonomy" 	=> "carousel_category",
    	"field"		=> "slug",
    	"terms" 	=> $atts['category'],
    	"operator"	=> "IN"
    );

    You’ll find it’s currently $args['carousel_category'] = $atts['category']; which apparently stopped working in WordPress version 3.9.2.

    Hope that helps!

    Plugin Author Phil Ewels

    (@tallphil)

    Hi @rigorousrich,

    Thanks for this! Any ideas why the current code works in my testing environment then? I just had another look, it’s definitely still working for both shortcode attributes and settings page configuration. I’m using WordPress v4.2-alpha-31427..

    Anyway, I’ve added it as an issue so that I remember to update to your code in a future release.

    Phil

    Hey Phil,
    Honestly, I’ve no idea! Maybe it is actually specific to the 3.9.2 release? That would seem a little odd though; I don’t think many changes happen to that class these days…

    Thanks for opening an issue; very kind of you! Totally see your point though; I’m sure I’ve got client sites using that code with no issues. Very strange.

    Rich

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Categories not working’ is closed to new replies.