- This topic is empty.
-
AuthorPosts
-
September 11, 2009 at 9:52 pm #26074yardleMember
Is it possible for SimplePie to filter out posts from a feed?
I’m working on a WordPress beta site and I am trying to setup SimplePie to only display posts from my feed that have a specific category attached to them. Is this possible?
The url of what I’m trying to do is here: http://trombonetranscriptions.com/wordpress/transcriptions/artists/j-j-johnson/
I have created a post and attached a category of "J.J. Johnson" to it. On this particular page, I would like ONLY this post to show up in the feed.
Thanks for any and all help!
PS – this is my first post on the forum and apologize if this should be in the php forum…i wasn’t sure…
September 11, 2009 at 10:03 pm #63883yardleMemberI think maybe the answer is at http://simplepie.org/wiki/reference/simplepie_category/start but because I’m pretty new to this, I’m pretty confused…
September 11, 2009 at 10:35 pm #63884yardleMemberLooks like I’m just going to have a discussion with myself because I’m just too impatient to sit here and am continually stumbling on some answers…hopefully someone gets something out of this…
I’ve figured out that the categories in WordPress create feeds of their own. Therefore to pull just my posts with the JJ Johnson category I have to point to the feed created by this category. This is awesome!
Now…
I inserted
Code:into the page.php template to achieve this. I would rather not create numerous templates for the sole purpose of entering the correct feed into each one. Is there any way I can have the feed url dynamically created in the template?
September 12, 2009 at 6:47 am #63906yardleMemberWell, I actually ended up figuring this out on my own with the help of lots of Google searches. I’m completely new to PHP and although it confuses the heck out of me, I’m really impressed with how powerful it is. Below is all the code for my template.
Code:Read the rest of this page »‘); ?>
‘
Pages: ‘, ‘after’ => ‘
‘, ‘next_or_number’ => ‘number’)); ?>
‘, ‘‘); ?>
LIke I said, I’m completely new to PHP so if any of this looks ‘janky’ or problematic, please let me know.
Link to the page is http://trombonetranscriptions.com/wordpress/transcriptions/artists/j-j-johnson/
haha well done yardle!
thanks doc.
going through that process was a great learning experience for me, however, i found a better method for what i need to do.
check out the AZIndex plug-in (http://wordpress.org/extend/plugins/azindex/) for WordPress. it creates a page, then lists all the posts on that page that fall into the category(s) you specify. it will list them alphabetically (which is why i’m going this route instead) or in any other kind of order you need. good stuff.
- The forum ‘Back End’ is closed to new topics and replies.