February 9, 201214 yr Hi everyone, On this WordPressbased website, if you click on several of the featured works you will see that each one has its own specific layout. How do you think they accomplish that ? I imagine they don't use a different PHP template for each and every post, or do they ? EDIT : well, actually the different layout is achieved with Photoshop so it's the same layout really. But on this other website they definitely use different layouts for each portfolio piece of work. So my question remains the same. Edited February 9, 201214 yr by zibizibi
February 9, 201214 yr they all look the same to me. Note that some of the posts have transparent background images made up of more than one image.
February 9, 201214 yr EDIT : well, actually the different layout is achieved with Photoshop so it's the same layout really. But on this other website they definitely use different layouts for each portfolio piece of work. So my question remains the same. But that's not a WordPress, so in fact, your question is completely pointless
February 9, 201214 yr You could add a class to the body which is the Post ID, and target the CSS that way. <body <?php body_class('class-name'); ?>> Edited February 9, 201214 yr by brightonmike
February 9, 201214 yr You could add a class to the body which is the Post ID, and target the CSS that way. Exactly. Should have this... <body <?php body_class(); ?>> ...all good to go.
February 9, 201214 yr Author Right but what if I need complete control over the layout of my thumbs ? For example : in one post all thumbs need be displayed one on top of the other, but then in another post I want a big thumb here, a row of 3 small ones there, and then maybe a testimonial over here, etc. Well in that case I guess I need to have one template for each layout, actually it's obvious because what could decide how exactly to display things except myself through custom code in a template ? Sorry then, please ignore this thread
February 9, 201214 yr If you have decent HTML markup to work with and great CSS you can do whatever you need to with CSS only. Swapping CSS files makes the most sense.
February 9, 201214 yr You could also learn to use Wordpress conditional comments to target specific CSS/Javascript at specific pages/layouts.
Create an account or sign in to comment