I wanted to use Mansion for my Miami Beach Huts website. It was ideally suited, however all my images are portrait instead of landscape. Some tweaks were necessary which I thought I’d share with you for endless hours of fun.
I wrote this for Version 0.2 of this theme. A few things have changed since then, especially the documentation. Keep that in mind while I’ll talk you through some tips and tricks of MANSION.
Since we’re playing around with the thumbnail sizes and orientations, the first thing you want to do is install an invaluable plugin called AJAX Thumbnail Resize by Junkcoder. It does exactly what it says on the tin: resize your existing thumbnails. This way you don’t have to worry about posts from the past – they’ll still look great when you upgrade to a new theme like this.
Picture Sizes
For each picture you upload, WordPress automatically creates three different sizes on the fly: Thumbnail, Medium and Large. These are saved with your original image file.
Mansion uses the Thumbnails to generate all pictures on the home page and then links each picture to the post it’s embedded in. To make them look good, the default thumbnail size needs to be set to 200×150 pixels (under Settings – Media). Make sure the box “crop tuhmbnails to exact dimensions” is ticked.
So far so good. If you’re writing a new post and you’ll upload a few pictures with it, all thumbnails will resize correctly. If you’ve previously used a different thumbnail dimension you can use the aforementioned AJAX Thumbnail plugin to rebuild them all to fit Mansion.
The readme file also suggests sizes for medium and large images (495px and 960px) – we’ll see how that affects single posts and pages a bit later.
Orientation: using Portrait instead of Landscape
For my project, all my pictures are portrait instead of landscape – so instead of 200×150 thumbnails I’d like to use 150×200 ones. Changing the size alone and rebulding all thumbnails creates rather big black gaps in between them, so we need to tweak the style.css file a bit.
Find the following code and tweak the WIDTH value to your own needs. Say you have 150 pixel wide thumbnails, set it accordingly.
/* Logo description styles */
#header {background: #333; width: 200px; float: left; }
The Height of the Nav-Box
You may have noticed that when you use a different width for your thumbnails, this will have an effect on the Nav Box. Let’s make sure it’s exactly twice the height of your thumbnails and the front page should have a good grid layout again.
Let’s look at style.css one more time – find this near the previous piece of code:
#header .menu {min-height: 150px;}
#header .logo {height: 150px; position: relative}
These lines together effectively make up the size of the nav box. The bottom one sets a size for your “Logo” (in this case just the text), and the top line will dynamically expand depending on how many pages and categories you’re showing.
Play with these values depending on your thumbnail size. In my case, if you’re showing 8 items in the list, 99px for the “Logo” works fine.
You can also make this size static by replacing “min-height” with “height”, but you may find that if you add more items (categories or pages) some of them won’t be showing. You could then just make the box bigger in multiples of your thumbnail height.
The Width of the Search Box
The integrated search box is made for a 200 pixel wide nav box. Since we just made that a bit slimmer, part of it now gets cut off. Fear not, for help is at hand – take a look at this piece of code in style.css (under Navigation Styles):
#nav #s {background: #2c2c2c url(images/search.png) 1px 3px no-repeat; border: 1px solid #222; width: 157px; color: #666;font-size: 11px; padding: 4px 4px 4px 16px; font-family: "Lucida Grande",Arial;}
The width value is the culprit – set that to something like 110px for 150px wide thumbnails. Feel free to play around with it to find a size that suits you.
in fact, the posts are there they are just on the next page! why has that happened and how can i make them all appear on one page like this website:
http://www.vvsvs.com/
thakn you!
Hi Catherine,
it’s down to WordPress to display a certain amount of posts on the front page. You can change this under Settings – Reading, “Blog Pages show at most…”. You can set as many as you like, but I think the maximum is 30.
Hope this helps 😉
totally helps! thank you so much!!
I am still having some issues which im sure are simple fixess, im a total novice to this i wonder if youcan help:
i would like to make the thumbnails bigger, so on the home page all the squares are slightly bigger, perhaps almost twice the size. when i changed the css i just got big gaps between each.
i have installed a plugin which disables comments (i basically dont want my site to look like a blog in any way) but the comments section is still showing?I have installed a disable date plugin, but now i still have the “posted on at” text above my post which looks really silly!
finally, i want all the buttons like “archives blogroll and meta” below my post to be removed but i cant work out how to do that. in my dashboard i dont have any widgets in my sidebar so im rather confused about that!
if you have any advice or ideas on any of these problems i would be sooo appreciative. 🙂 🙂
Hello, 2 questions here.
1) When using the big “featured” image on your home page so you have 1 big image and the rest small, the 2nd page is thrown off. How do I make it so the 2nd page would have 16 post and the first page have 13(with one big image)?
2) I tried to add that code:
<a href=””>
to my nav.php at the top and nothing showed up. Yes i put a link to my image in the quotes. It was a .png file if that matters?
Also, how do I make it fill out the screen with pictures? Like make the width 7 pictures wide and no black on the right side.