Featured Posts Grid
[resolved] Having trouble showing only one category (5 posts)

  1. Luk Gaming
    Posted 4 years ago #

    I tried using the code listed on the Plugin site to show only one category but it doesn't work for some reason and I'm still seeing the latest posts. I've tried everything, using the category id, the slug and the full name - none of it seems to work.

    The category is called 'Banner Posts', the slug is 'banner-posts' and the id is '1816'.

    Any help would be much appreciated.

    This it the code I tried to use:

    <?php if (function_exists('fpg_show')) {
                $args = array(
                    'cat'     => 'Banner Posts',/* comma separated list of category ids to include (put '-' in front of ids to exclude) */);
                echo fpg_show($args);


  2. chadhugo
    Posted 3 years ago #


    i have the same problem, it displays all categories. i've also tried to exclude all categories except the one i need, but it didnt work.

  3. Chaser324
    Plugin Author

    Posted 3 years ago #

    If you're using the cat parameter, you have to use the category ID, not the slug.

    If you want to filter on the slug, use the category_name parameter.

  4. chadhugo
    Posted 3 years ago #

    Thanks, it's working.

    Actually, i'm using a french version of wordpress, and "slug" is translated to "identifiant" (=id), so i thought that this category ID was this "identifiant"...


    I dont think Luk Gaming has made the same mistake than me but just in case : to know the cat ID, go to your categories menu, put your mouse over the category you need, and in your adress bar you'll see "http://*****.com/wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=xx&post_type=post

    the cat ID is the "xx" (in tag_ID=xx)

  5. Luk Gaming
    Posted 3 years ago #

    Hi Chaser, that wasn't the issue for me, I used the Category ID and it still didn't work neither does category_name. What is the exact code needed?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Featured Posts Grid
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic