• Resolved Ologix

    (@megaquebec)


    Hi!

    Your plugin is awesome! But I have a little problem. The categories and tags filter are not working.

    I have a custom post type named “plans”. It works great if I don’t add any categories or tags, but as soon as I add one, absolutely no posts are shown.

    Here is the shortcode that I use (if I remove the “fibre” tag, it works. Note that I have 5 plans with the “fibre” tag):

    [wp_posts_carousel template=”light.css” post_type=”plans” all_items=”100″ show_only=”id” ordering=”asc” categories=”” tags=”fibre” show_title=”true” show_created_date=”false” show_description=”content” allow_shortcodes=”true” show_category=”false” show_tags=”false” show_more_button=”false” show_featured_image=”false” image_source=”thumbnail” image_height=”100″ image_width=”100″ items_to_show=”4″ slide_by=”1″ margin=”5″ loop=”true” auto_play=”false” stop_on_hover=”false” auto_play_timeout=”1200″ nav=”true” nav_speed=”300″ dots=”false” dots_speed=”800″ lazy_load=”false” mouse_drag=”true” mouse_wheel=”false” touch_drag=”true” easing=”linear”]

    Do you have any idea of what is happenig? Am I doing something wrong or is it a bug somewhere?

    Thanks!

    https://www.ads-software.com/plugins/wp-posts-carousel/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author teastudio.pl

    (@teastudiopl)

    what is yours custom post taxonomy slug of “tags”?

    it should be:
    for categories: plans_category
    for tags: plans_tag

    Thread Starter Ologix

    (@megaquebec)

    Thanks for the fast reply!

    Not sure to understand.

    Here is what I do :

    I have ativated the categories and the tags in my custom post type (I am using CCTM, Custom Content Type Manager)
    https://snag.gy/1Bnmk.jpg

    And then I add the tag in my plan post like that :
    https://snag.gy/cnNyg.jpg

    Do I need to do something else?

    Thanks!

    Plugin Author teastudio.pl

    (@teastudiopl)

    this plugin is weird.
    Could you create custom taxonomy, with WordPress structure of codename:
    plans_tag and plans_category, than all should works fine.

    https://imageshack.com/a/img901/2369/5PBoO6.jpg

    Thread Starter Ologix

    (@megaquebec)

    Hi,

    Thanks again for the reply.

    Not sure why I should do this. My custom post type is basicly using the same categories and tags manager than any other regular post.

    I just tested it with another shortcode and it works fine. For exemple with the “post grid” shortcode from cherry framework.

    [posts_grid type=”plans” columns=”4″ rows=”1″ order_by=”date” order=”DESC” meta=”no” link=”yes” tag=”fibre”]

    As you can see, I use the “plans” post type and the “fibre” tag. Everything works. So I guess it is supposed to be the same thing in your plugin too.

    Maybe there is a little bug somewhere. Can you check that?
    I’ll tell you if I have any additionnal informations.

    Thanks! ??

    Thread Starter Ologix

    (@megaquebec)

    Hi,

    Just to let you know. I fixed the problem by myself.
    That’s a little hack that fit my needs only, but maybe you could implement it in a clean way for other people.

    So, the problem is that the CCTM plugin that I use is using the same tags and categories than regular posts. So there is no ‘post_type_tag’ or ‘post_category’ needed.

    In your plugin, as soon as I specify a custom post type, it generate a query with the name of the post type for the tags and categories.

    I simply removed it in your code to always use the orignal ‘post_tag’ and ‘category’ arguments for the query. Now it works as expected.

    Maybe you should add a option to “use original post settings” or something like that.

    Anyway, I’ll mark this thread as resolved as it is working great for me now.

    Thanks again! Your plugin is really awesome! ??

    Plugin Author teastudio.pl

    (@teastudiopl)

    ok, thanks for info.
    I’ll work on that.

    hi megaquebec,

    could you tell where exactly you’ve edited the code?

    thanks!

    Thread Starter Ologix

    (@megaquebec)

    Hi litradio,

    Can’t be sure if it’s gonna fit your needs, but it worked for me.

    In the file “carousel-generator.class.php” around line 82. You should find this :

    $post_type = $params[‘post_type’] ? $params[‘post_type’] : ‘post’;
    $post_type_category = $params[‘post_type’].’_category’;
    $post_type_tag = $params[‘post_type’].’_tag’;

    Replace it by this :

    $post_type = $params[‘post_type’] ? $params[‘post_type’] : ‘post’;
    $post_type_category = ‘category’;
    $post_type_tag = ‘post_tag’;

    That’s all!
    Tell me if it works. ??

    tried that, but after i put in then category ID of custom post nothing showed up…

    Thread Starter Ologix

    (@megaquebec)

    You’ll probably have to debug a little bit to see what is loaded in the variables of the generator class.

    I’m sorry I can’t really help you more than that as I don’t know how your site is built. As I said, it’s a hack that work for me, but maybe not a perfect solution for all.

    Tell me if I can do something else.
    Thanks.

    Plugin Author teastudio.pl

    (@teastudiopl)

    please, send me admin access to website, I’ll check that. ([email protected])

    you’ve got mail…

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘tag and categories not working’ is closed to new replies.