There is now an “archives” shortcode
-
It pays to snoop around once in a while. While looking at the shortcodes support document I happened on a new one; Archives. http://support.wordpress.com/archives-shortcode/
It will create a list of your posts on a page and also has various “options” you can set. To see a sample (basic with no options) take a look at http://opposablethumbz.wordpress.com/shortcode-archives/ . I haven’t played with all the “options” yet so I cannot give feedback on those.
The blog I need help with is: (visible only to logged in users)
-
Thanks for letting us know about this. Now I know what else needs to be styled when I make/port a Sandbox skin… especially now that I was about to release a new one (and which I’m currently using). I’ll add those elements before I release the code.
-
You’re welcome. The one on my blog here is a little bland so I’ll have to CSS it up a little, but this is a good feature. Many have asked for such a thing.
-
The short code is not well implemented. I was pulling my hair out wondering why my styles wouldn’t get applied and the reason why is because they didn’t implement the code well when the short code is parsed…
Instead of doing this:
<p> <strong> All </strong> <br /> </p> <ul> <li> <a title="New Skin and New Blog" href="http://sandboxskins.wordpress.com/2009/07/23/new-skin-and-new-blog/"> New Skin and New Blog </a> </li> <li> <a title="New Wallpapers" href="http://sandboxskins.wordpress.com/2009/07/13/new-wallpapers/"> New Wallpapers </a> </li> <li> <a title="Syfy’s House of Imagination" href="http://sandboxskins.wordpress.com/2009/07/09/syfys-house-of-imagination/"> Syfy’s House of Imagination </a> </li> </ul>They did this:
<p> <strong> All </strong> <br /> </p> <li> <a title="New Skin and New Blog" href="http://sandboxskins.wordpress.com/2009/07/23/new-skin-and-new-blog/"> New Skin and New Blog </a> </li> <li> <a title="New Wallpapers" href="http://sandboxskins.wordpress.com/2009/07/13/new-wallpapers/"> New Wallpapers </a> </li> <li> <a title="Syfy’s House of Imagination" href="http://sandboxskins.wordpress.com/2009/07/09/syfys-house-of-imagination/"> Syfy’s House of Imagination </a> </li>Notice what’s wrong with that?
QA any one?
-
-
-
It also has that obnoxious “shortcode archive” title at the top of the page which has to go.
Devblog, are you going to alert them to the missing tags?
-
Oops, I just realized the “obnoxious title” at the top of the page was what I named the page.
Where did I put that rock I crawl under?
-
-
-
-
-
@tsp: Thanks for posting this!
Interesting detail: In contrast to most shortcodes, it works in a text widget.
(Off-topic, but also news: now all themes except Monotone are widget-enabled.)
-
-
-
Nice.
Now, there’s another bug. This bug can be seen when you use ‘before’ and ‘after’ parameters:
[archives type=weekly limit=17 before=some-text after=some-more-text]it produces this:
# some-textJuly 19, 2009–July 25, 2009some-more-text
# some-textJuly 12, 2009–July 18, 2009some-more-text
# some-textJuly 5, 2009–July 11, 2009some-more-textNo space between ‘text’ and ‘July’ nor ‘2009’ and ‘some’
-
Because we do not want to force a space on users, any spacing will need to be added within the parameters of the shortcode. Here is an updated example that should work:
[archives type=weekly limit=17 before='some-text ' after=' some-more-text']We have updated our examples to include the quotation marks when using the before and after attributes.
-
Because we do not want to force a space on users
Really? I don’t see a scenario where the user would not want to have a space… but sure, if adding quotation marks does the job, then no problem.
-
ummmmm,sorry peeps, but I have no idea what y’all talkin’ about up there. I was so excited to see that feature but I can’t get it to work at all. I added the page, I did what they said to do and I keep getting an error message. I could cry. What am I doing wrong? Can anyone help a technologically impaired person, please…
- The topic ‘There is now an “archives” shortcode’ is closed to new replies.