Support » Plugins » Just show one category

  • Hi All,

    i was wondering if anybody had any experience with this,

    i’m trying to get the index.php file on my site to show just one category of posts

    if the blog has say 3 categories, how do i just display all the posts from one category, do i have to modify the

    <?php the_content(); ?>

    in the index page..?

    any ideads..?

    thanks in advance..

Viewing 15 replies - 1 through 15 (of 16 total)
  • Mark (podz)


    Support Maven

    Hi podz,
    The plugin is no longer available on Kitty’s site, and try as might I cannot for the life of me find it in the Plugin repository. Sorry if I’m missing something obvious….

    I’m having the same problem with the Plugin Repository.

    Mark (podz)


    Support Maven

    Me too … just tried looking for this.
    I got some stuff out of there the other day so it’s not all bad.

    Thanks for this ppl..

    none of the above links goes to any download page, page not found.

    Whenever I tried that, I received the following error:

    Fatal error: Call to undefined function: add_filter() in /home/ashadeof/public_html/wp/test.php on line 62

    If I removed the line in question, I received an entirely white page.

    What am I doing wrong?

    My first solve on WP!!!

    Ok, ashadeofgrey:

    In that file that is listed above, you will look for this section of the file:

    function fpc_where($where) {
    // Change this to the categories you want to show on the front page.
    // Example: $cats_to_show = ‘1 2 3 4’;
    $cats_to_show = ‘1’;

    Keep in mind the code listed above is the original, without your changes. Now refer to your Manage-> Categories-> (in WP 1.5).
    Each category has an ID number. Thi is the ID number for which this file is referring.

    For example: If you have category IDs 4, 7, 12, 25, 80 and you only want category id 4 to show on your Main page (index.php) then you will edit this line to appear this way: $cats_to_show = ‘4’;

    Refresh your page and you will only see category 4 posted on the index.php file.

    I hope that helps you. It worked for me.

    I’m using this plugin – great idea! – but have the problem that it only works with ID numbers below 10. The moment I have 2 digit numbers in the listing, it will no longer work and list all categories. I tried separating by comma, but it will again not show correctly, for example:

    1 2 3 4 5 7 8 9 will work fine

    but : 1 2 3 4 5 7 8 9 10 11 17 19 20 21 will also show category 12 and 18 which I don’t want to show

    and : 1 2 3 4 5 7 8 9,10,11,17,19,20,21 will show category 21 but not 17 etc.

    any idea how to fix this problem?

    Oddly enough : ‘1 2 3 17 4 5 6 7 8 9 ,11 ,20 ,21 ,10 ,19’; seems to work (moved the 17 further to the front in the listing and comma/space further back to the listing. Doesn’t make sense to me though, why like this and not otherwise. It actually does not seem to be as much as the 2 digit numbers but rather if I list more than 10 ID’s. Is there a cleaner solution than my ‘shuffling around until it seems to work’? Thanks for any input.

    Personally, I’d like to see a change to the WordPress Admin Panel for this. What I’m suggesting is that when it comes to links, I can choose to make them “visible” or not. I don’t see why this same functionality couldn’t be added to the Category panel. Perhaps the Shuttle developers are already looking at this.

    Well, there IS a definite bug in it when choosing which categories to show. I just can’t get it to show all the categories which I enter into the $cats_to_show line.

    Is there a way to have just ONE NEGATIVE category, i.e. “show all but NOT this one on the front page” ?

    I need to clarify what I found. The problem is that if I select a parent category to show, it will automatically show all children categories too, what I did not want.

    My solution was to move the offending child category under another parent category.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Just show one category’ is closed to new replies.