Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Unique layout for each post

Featured Replies

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 by zibizibi

they all look the same to me. Note that some of the posts have transparent background images made up of more than one image.

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 :p

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 by brightonmike

  • 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 :(

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.

You could also learn to use Wordpress conditional comments to target specific CSS/Javascript at specific pages/layouts.

  • 2 weeks later...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.