Hey all. I've made this wordpress theme. when you click archive in the lower right corner a masonry thumbnail grid appears. Now i want the thumbnail containers to be clickable so they open the post they belog to. the code for my boxes is:
Maybe i didn't come across properly with what my problem is. I'd just like to click a thumbnail anywhere except the tag buttons and open the post. Putting the span inside an a seems to be the wrong idea. :(
I'd still like to keep the hover effect i put so much work into, though.
Mh it doesn't seem to work and it keeps masonry from working correctly. Isn't there some rule about not being allowed to put block elements into inline elements (i.e. a tags)?
what would be a good way to get it more semantic but not loosing the looks?
Still i'm working on this website and I don't know how I would get the thumbnail containers clickable. I would like to have them linking to the post (via permalink) when you click them anywhere except the tag buttons obviously.
...despite a rollover?
Hey all. I've made this wordpress theme. when you click archive in the lower right corner a masonry thumbnail grid appears. Now i want the thumbnail containers to be clickable so they open the post they belog to. the code for my boxes is:
and the css for that area is:
How will I get that to work? Is my HTML correct for that specific task?
Maybe i didn't come across properly with what my problem is. I'd just like to click a thumbnail anywhere except the tag buttons and open the post. Putting the span inside an a seems to be the wrong idea. :(
I'd still like to keep the hover effect i put so much work into, though.
@bogus Hey. Try this:
Although you might want to rethink your code as it doesn't appear semantic.
hey chris. Thank you!
Mh it doesn't seem to work and it keeps masonry from working correctly. Isn't there some rule about not being allowed to put block elements into inline elements (i.e. a tags)?
what would be a good way to get it more semantic but not loosing the looks?
@bogus Post your code in http://codepen.io so we can take a look. Where is the inline element you're referring to?
Span class rollover, isn't it?
Will post the code asap!
okay, here is a quick mockup (pretty dirty, i'm at work) but it should show what I mean:
Codepen
@bogus Hey, do you have a live site that I can take a look at with the masonry in place?
Ok, I edited your code that relies on better semantics.
http://codepen.io/chrisburton/pen/hBdis
I commented out your CSS but I think you should start again with my approach.
yeah chris, take a look at my link in my first post. that is my current wordpress test install.
thanks for your help! it's well appreciated.
@bogus Oops, I forgot about that. Can you tell me what this outputs?
actually the boxes that are then put in place by masonry.
@bogus I mean that I need to see the code that it outputs.
sure. it outputs this:
hey,
gotta dig this topic out again.
Still i'm working on this website and I don't know how I would get the thumbnail containers clickable. I would like to have them linking to the post (via permalink) when you click them anywhere except the tag buttons obviously.
seems to be really tricky..
@bogus Instead of
<div class="box">, you need to use<a href="<?php echo the_permalink(); ?>" class="box">