Hello @runamuk0,
You should not setup a taxonomy in case you need just years and months. Just use:
[gallery monthnum="12" year="2015"]
The shortcode works when the feature is activated on Media Settings > Taxonomies > Options > Gallery > Enhanced Gallery.
Best,
-Nadia
Thread Starter
runamuk0
(@runamuk0msncom)
So where does it get the year and month? Is it the upload date or something else? I need it to be my data because I have older media that I am adding now.
Yes, it’s the upload date. It is based on WP media library default filters. In case you need a different classification you can create two – photo_year and photo_month – or one – photo_date – taxonomies, for example. Then your shortcode should look like this:
[gallery photo_year=%term_id% photo_month=%term_id%]
At the moment EML doesn’t understand slugs and names of terms, but I guess, we add the support for those in some of upcoming releases.
Best,
-Nadia
Thread Starter
runamuk0
(@runamuk0msncom)
How does the category setup work? Is it hierarchical like:
photo_year
2008
2009
2010
2011
photo_month
1
2
3
…
Yes, like this. You can use any text for month and years, for example:
Dates:
January 2016
February 2016
…
Months:
Jan
Feb
…
Any view you need. But you can use these terms with their IDs, not their slugs right now. So, if:
Months:
Jan (slug: jan, ID: 5)
Feb (slug: feb, ID: 7)
…
The you should use ID in shortcode:
[gallery photo_month="5"]
for images from January. Not much intuitive, though :). We will add slugs support definitely in one of the future releases.
Best,
-Nadia