humanmade / Simple-Instant-Articles-for-Facebook

Add support for Facebook Instant Articles to your WordPress site.
7 stars 0 forks source link

Refactor feed to use main WP_Query #44

Closed mattheu closed 8 years ago

mattheu commented 8 years ago

We shouldn't be doing a second query. We should modify the main query.

Also, I've always been a bit skeptical about how we seem to have a loop in both feed and article. I think we can loose that now we're only using the main query.

However then we need to call the_post before including the single article page. I think its fine to just call this in our template redirect method.

I don't think we need to handle not having any posts. We can just not show anything as this isn't intended for users.