Brown-University-Library / onepress-cds

CDS WordPress theme based on OnePress
1 stars 0 forks source link

Create project list #12

Closed briancroxall closed 7 years ago

briancroxall commented 7 years ago
briancroxall commented 7 years ago

It might be better, actually, to just put the project title below the "button," just so we aren't having to contend with however busy the button's graphical element is or limit ourselves when designing the images for the projects.

briancroxall commented 7 years ago

@kerri-hicks suggests using cat-list plugin for pulling the random post. I'll look into that next week.

briancroxall commented 7 years ago

Okay, so I was able to use catlist to pull up a random 3 blog posts (AKA projects) and include images using [catlist name=project orderby=rand numberposts=3 order=desc thumbnail=yes force_thumbnail=yes]. The problem is that once I pull the 3 projects, it seems impossible to sort them into alphabetical order, despite my using order=asc. I've opened an issue on the catlist GitHub repo about this.

I'm going to investigate shortcodes ultimate to see if it can do what we want.

briancroxall commented 7 years ago

Okay, Shortcodes Ultimate can allow me to pull 3 random blog posts using [su_posts posts_per_page="3" tax_term="3" tax_operator="0" order="asc" orderby="rand"]. But it also doesn't allow for ordering the random list nor does it provide an option for including images.

As such, I think catlist is the better choice.

briancroxall commented 7 years ago

Looks like we need to create a CSS class for the <ul> for the project page. Proposed class name of project-list. We can then invoke this in the shortcode with [catlist ... class=project-list].

briancroxall commented 7 years ago

According to the issue I opened, we can't do random and alpha sort at the same time.