Viewing 1 replies (of 1 total)
  • Plugin Author Curtiss Grymala

    (@cgrymala)

    Thanks for the note. This is sort of a bug in the plugin, as a result of trying to make things easier on users. Basically, the way the plugin works is:

    If the category attribute is a number, it assigns it to the cat_id argument when it runs the query.
    If the category attribute is not a number, it assigns it to the category_name argument when it runs the query.

    Since “1,2” is technically not *a* number, it assigns that to the category_name argument.

    In order to get around this, you will probably need to make the following adjustments:

    In your theme’s functions.php file (or in a mu-plugin, if you understand how those work), add the following:

    <?php
    add_filter( 'post-content-shortcodes-defaults', 'add_cat_id_arg_to_pcs' );
    function add_cat_id_arg_to_pcs( $defaults=array() ) {
        $defaults['cat_id'] = null;
        return $defaults;
    }
    ?>

    Then, in your shortcode, use cat_id="1,2" instead of category="1,2" and see if that works. Thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘post-list multiple categories bug?’ is closed to new replies.