SandersForPresident / SitesForBernie

SandersForPresident WordPress theme for campaign microsites
http://forberniesanders.com
Other
26 stars 9 forks source link

Filter news based on campaign or site news #39

Open atticoos opened 9 years ago

atticoos commented 9 years ago

Allow an easy switch between campaign news and site news. Perhaps put the first 3 site news articles at the top.. Or maybe 2 columns, one for each?

Sites are going to post less frequently than daily campaign posts, so they will get lost FAST.

I'm all for the 2 columns actually

atticoos commented 9 years ago

I vote for columns here

jasonbraun commented 9 years ago

I agree, two columns would be most effective, each one titled "Campaign News" and "Site News" or something like that. I'll work on this next. One question is, would the Site News be blog posts from within WordPress or where would we grab the feed from?

atticoos commented 9 years ago

Yessir -- posts from WP

atticoos commented 9 years ago

Wanted to drop a note on how this is set up, as it's not using the conventional WP Loop:

So over in the news template, home.php, we get the posts by calling the $newsFeedService->getNewsFeed

This gives us a combined collection of the remote & local news.

To get them individually, you can separate the two collections like so:

$newsFeedService = new NewsFeedService();
$localNews = $newsFeedService->getLocalNewsFeed();
$remoteNews = $newsFeedService->remoteNewsFeedService->getFeed();

The news articles both share a common interface, and you can see in the template how they're used

jasonbraun commented 9 years ago

Thanks for clarifying this, I was looking at everything and trying to figure out what was going on there. I am a little unfamiliar with doing it this way but it makes sense. And since we're doing this is on home.php this will be the default news layout with two columns.

Another question, which column is most important - Site or Campaign? Site news first on the left? would end up on top on mobile. Then campaign on the right, which would end up on the bottom on mobile.

atticoos commented 9 years ago

In previous conversations we had decided that the Site would be the priority content.

So basically,

Site news first on the left? would end up on top on mobile. Then campaign on the right, which would end up on the bottom on mobile.

Is exactly on point.