Sort Feed Posts with specific "dc:creator"'s value. #471

Open
ForestTatsuya opened this Issue Sep 23, 2016 · 1 comment

Projects

None yet

2 participants

@ForestTatsuya

I want to sort Feed Posts with specific "dc:creator"'s value in my WPsite. And show 10 posts.
`include_once( ABSPATH . WPINC . '/feed.php' );

$url = 'http://www.abc.co.jp/blog/feed';
$rss = fetch_feed( $url );
// What should I do next?`

How can I pick up only related posts with specific "dc:creator"'s posts from $rss.

Is there some manual in Codex?

@JanPetterMG
Contributor

Since no one has answered yet, I'll give you this simplified guide:

  1. Fetch the feed
  2. Use foreach to go throu item for item
  3. If dc:creator matches your criteria, save it to a new array
  4. Use the data in the newly created array, as source for your "10 posts" list

By googling a little bit, and some basic php skills, this should be pretty easy to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment