You can create as many templates as you want and assign any of them to as many categories as you wish. If you setup your blog to have videos in one category and images in another, then I see no problem with reaching what you’ve described.
One thing I should mention – if you have a post in two or more categories to which an Asideshop template is assigned, Asideshop will use the first category. As Asideshop uses WordPress category fetching function, it’s ordered alphabetically, so category “Images” will precede “Videos” and therefore template assigned to category “Images” will be used.
Understandable. This is a great addition to WordPress functionality and makes a proper tumblog possible. I will have to try it out and report back.
Another question. I have never used templates in WordPress. Can one assign unique CSS attributes to each category of post using templates i.e. can I have unique styles for each post where, say, the title for video category posts are 16pt and red and the titles for, say, image category posts are green and 10pt (not that I would do that =-0 )?
The solution to your problem is inline CSS applied to tags in your AsideShop templates. Say, you want post title to be red, so in your AsideShop template you write
<p style="color: red;">%post_title%</p>
Hope this helps.
It looks pretty flexible, actually. I am even able to add css selectors into the template that match the stylesheet I already have set up.
Can you give me feedback about compatibility with WordPress 2.5? I’d appreciate it a lot!
Oh, sorry. Sure! I’m just havin’ fun playin’.
So far, so good. There is some formatting weirdness (I think) on the AsideShop admin page after you go to edit a template. It’s merely cosmetic, though: the columns under “available tags” crash a little. Here’s a pic.
Other than that it has been smooth sailing. I’m just learning the ins-n-outs of what can go in a template and what can’t, how to format links, etc., etc. Thanks for making the plug-in. It really makes creating asides very smooth and easy.
I am sure I will have questions as I go. You’ll hear from me again =-0
(I put this post in the AsideShop and WordPress 2.5 Compatibility forum as well. Seemed fitting)
@danapalooza, I am trying to do exactly the same thing – essentially replicate the styling I had on my tumblr for the given post types. This looks like it’s going to be pretty straightforward, but could you give me an example of what you’re doing both inline and in your stylesheet to call out a specific selector for a specific style? I’m self-teaching myself this stuff and am curious as to the kosher way to do be able to call from inline to the stylesheet.
And to hijack this with a semi-related question, in case you’ve got the answer handy: I have the date coming up at the top of every day of posts (as opposed to under the title of a post every time). Say I haven’t blogged in a week. The last date says “April 17,” and when I make a new post, the new date appears above it. My asides don’t cause a date to appear above them, they just hang there at the top all alone. Any idea how to get the date back in its regular styling?
The date thing – it may be caused by CSS styling – floats and clears sometimes can be tricky.
It’d be better if you provided the URL to take a look at.
Thanks for taking the bait, I really appreciate it! my site is here, I’ve modified the Minim theme, and stole code from the WordPress Classic theme’s index.php to do that date-once-per-day thing I tried to explain.
To restate my question, I’m trying to figure out what WP wants to see in order to throw that date up there (as on my site or the Classic theme) so I can then fit that into my AsideShop asides.
Thanks for your charity sleuthing for this novice!
Further messing around and I guess I need to know where to go in AsideShop’s code to input the PHP which calls the date, is that right?
I have an example link post up so you can see what’s missing.
Similarly to danapalooza, I want comments on these posts, too, so again I think I need to know where to plug in that PHP into AsideShop, is that right?
If I understood your question correctly, you want the date to appear above only once for those posts which are posted in that day, is that correct?
If so, I think you can’t manage to do it without some hacking of AsideShop as AsideShop takes appropriate post and parses it according to the template specified. No conditions are possible under current implementation to have date shown only for the last post in that day. Sorry.
Here is a bit on how I have set up the template/category relationships and the template code for each:
photo posts template:
<div class="post"> %post_content% <span class="byline"><a href="%post_permalink%">perm.</a></span> </div>
link posts template:
<div class="post"> <div class="link-post"> %post_content_filtered%<span class="meta"><a href="%post_permalink%">permalink</a></span> </div> </div>
video posts template:
<div class="post"> <div class="video-post"> %post_content_filtered% <span class="meta"> <a href="%post_permalink%">permalink </a> </span> </div> </div>
quote posts template:
<div class="post"> <div class="quote-post"> %post_content_filtered%<span class="meta"><a href="%post_permalink%">permalink</a></span> </div> </div>
You can add as much CSS as you’d like to templates. The first DIV, called post, was already in the template I was using. I used it as the surrounding DIV in order for the template to format my aside post just like the regular posts in a general sense and then I added the unique features to each type of post using the second DIV.
More later (I’m at school right now)…
A little more stolen time:
I remember messing with the ability to add the date to the “top” of each day of posts a while ago. If I remember correctly I needed to edit one (or more?) of the WordPress PHP files. If I remember correctly I effectively “stripped out” the date function from being attached to each post to being “outside” of the posts.
@presta: Check the index.php file and see if you can find the date function.
I hope that this makes some sort of sense As you can tell I am no PHP master myself.
That’s all for now…
Thanks to both of you.
@maijs: It definitely sounds like you understood my question (showing date only above the last post of the day) and you say the code’s not capable of that, so that’s good to know definitively.
@danapalooza: Thanks for the insight, man. I actually ended up using my free time yesterday to hack into the PHP of the QuickPost plugin and have that doing 3/4 of the Tumble functions I was looking for, but through a similar sort of call to special classes in span tags, so I’ll go back and look if what you’ve got is a more elegant way to do what I want. If you’re ever curious about the QuickPost solution, I can fill you in.
- The topic ‘[Plugin: AsideShop] Multiple Template Types = Tumblog?’ is closed to new replies.