Comments (1)
Iām happy with this, @danjjohnson. Could you submit a pull request (normal branching workflow applies, with a release branch, of course)?
The only adjustment Iād make, at the outset, would be to use has-posts
and no-posts
as the CSS classes (inclusion of hyphens). :)
Matt Cohen
Chief Product Officer at WooThemes
http://woothemes.com/
http://matty.co.za/
On Friday 03 January 2014 at 6:25 PM, Dan Johnson wrote:
I had a user wanting to hide the year headings for years containing no posts. Could we add a css class to each year heading to indicate whether or not there are any posts for that year?
I did a test version as follows, but I'm sure there's probably a more efficient way:
/* Print year headings until we reach the post year */ while ( $working_year > $post_year ) { if ( $working_year - $post_year == 1 ) { $headingclass = " hasposts"; } else { $headingclass = " noposts"; } $working_year--; echo '' . $working_year . '
'; }ā
Reply to this email directly or view it on GitHub (#4).
from archives.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from archives.