Custom Category RSS Feed question
-
I hope this hasn’t been asked a hundred times. I searched, but couldn’t find an answer to this specific problem. The answer is probably simple, and I will feel dumb.
That having been said:
I’m building a custom category feed. I need it to have at least 50 entries in it at all times (I’m pulling the data into a custom visualizer). I’m using the following code at the moment:
…
<?php while( have_posts()) : the_post(); ?> <?php if (in_category('1')) continue; ?>
…
I only have two categories, this excludes the one I don’t want in the feed. unfortunately, this logic basically says this:
Of the last [foo] number of posts (where [foo] is the “Show the most recent” setting) show all the entries that aren’t category 1.
The problem with this, of course, is that in the last [foo] entries there may not be 50 entries in the category I want.
I need logic that says:
Give me the last 50 entries from category 2.
I feel stupid that I haven’t found it, so any help will be appreciated.
- The topic ‘Custom Category RSS Feed question’ is closed to new replies.