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.


{ 160 comments… read them below or add one }
← Previous Comments
Hi, After searching online I found a similar Theme, I do not know if that’s the point to ask but I could not figure out how to work it, and did not find any explanation for this on network. Perhaps you could help with instruction or a link that explains how to run it? Your guide is very clear and focused, so I turn to you. The theme that I found is called Monokrome.
It’s very off-topic – let’s discuss it in my brand new forum over here: http://wpguru.co.uk/forum. I’m testing it out right now, let’s see if it works
Hi Jay!
I Would Like to say thank you very much!
And I asked about deleting the sidebar at the right side sometime ago! And I would let you know that I figured out by myself (more or less).
Now i’ve got an “dynamic” few for the posts.
Naah just take a look that you know what I ment!
Hi Lexadus,
I completely forgot to get back to you – thanks for remembering. And well done for getting rid of the sidebar – your pictures are amazing! The thumbnail gallery works really well on those posts.
Keep’em coming and happy shooting
great documentation! helped me alot so far.
however, i was wondering if it is possible to embed the facebook like box into the nav bar?
i already tried copying the embed code into the nav.php at different positions (i have no clue about html) but without any result…
i also noticed that after activating Mansion on our test-blog, that not all posts get shown on the mainpage. all of those have featured images tho. i don’t really know why some might get exluded?
nevermind my previous questions, i found the solution right after posting this comment. as usual.
i put the embed code into the header.php and it works.
and about the posts not showing up, re-uploading the image and setting it as featured solved this problem.
Excellent Alex, glad to hear it’s all sorted now
trying to figure out why the nav box wont take the padding, text size or show my categories if anyone can help. I am not the greatest when it comes to this but love learning
Thanks! Love the amout of info in this article!
hi again,
so, as of yesterday the like button on the front page within the grey box on the left doesn’t show up anymore. it does however show up within a post/article.
i didn’t change anything so i wonder why that is?
however i thought about implementing the like box instead of the like button for the page, but for this i need to change the behavior of the grey box. (what’s it called by the way)
as you might know, the height of the grey box gets halfed whenever someone reads a post. how can i make it stay the same size?
Hi Alex,
I just had a look at your site, and the Facebook Button works fine for me – here’s a screenshot: http://db.tt/xVvoJwLJ
Perhaps it’s your browser cache, clear it or types wit a different browser.
To be honest tweaking that menu box to stay a certain size is a bit of a nightmare – I never managed to do that. Besides the Facebook Box (as displayed in the sidebar on this side) is going to look messy in that place in your front page IMO. What about adding that box to your sidebars? That way it would show up when people click on a single post? I’m using a plugin called Facebook Fanbox for this.
i think the problem with the like button was that i used the html5 version for this. after changing to the iframe code it works as before again.
the sidebar is a good idea, i will look into that and see if it looks good with our design.
thanks for the help and have a nice day
alex
yea…me again, with yet another problem, yay…
so THIS time none of the articles i publish make it to the mainpage. first i thought it’s related to the wordpress-software. but then i tried different themes and the posts all show up there.
)
if you look at the homepage, you will see that the first post there uses the small thumbnail, but its actually still tagged with feature. but because the newest post has the feature tag, it gets small again. so the post somehow does get recognized, but it just won’t show itself!
this problem occured all of a sudden, i didn’t do any changes to the .php files (except for the fb like box ofc
on this thread ( http://wordpress.org/support/topic/new-post-not-showing-up-on-homepage?replies=4 ) someone suggests taking a look at the “query_posts” command. i did that, but i couldn’t find anything unusual like excluded categories. (i also did tests with several cat. and none of them worked)
just in case thats the part from my index.php that should be responsible for the frontpage-post-showing-behaviour:
query_posts(“cat=&paged=$paged”);
$count = 0; if (have_posts()) : ?>
array( ‘featured’ ), ‘default_size’ => ‘featured’, ‘width’ => ’401′, ‘height’ => ’301′, ‘image_class’ => ‘featured’ ) );
else :
get_the_image( array( ‘custom_key’ => array( ‘thumbnail’ ), ‘width’ => ’200′, ‘height’ => ”, ‘image_class’ => ‘thumbnail’ ) );
endif; ?>
i hope you have at least a clue what might cause this problem and can help me (again).
best regards
alex
just some additions:
the post(s) are not private, i cleared the cache several times and problem occured last week for the first time when i wanted to publish something.
i then published two other articles since then, they showed up without problems.
today i wanted to publish the article from last week, didnt work.
and now i can’t seem to publish any article.
Hi Alex,
If this problem started without any changes to the blog (i.e. new plugins or upgrades) then my first thought is the cache. Try disabling cache altogether and see if that works.
Also, just checking you’re not using any category excluder plugins right? They can cause some trouble at times.
I’m looking at your site – when was you latest post, and what’s it called?
i think i never had the cache activated in the first place. switching it on/off and clearing it doesn’t change anything.
also i’m not using any category plugins. i tried disabling all plugins but it didn’t change anything.
the latest post is called testpost2 here’s the link http://2groove-concept.net/blog/2012/04/testpost2/
i noticed that the frontpage is now called “Home page / Archives” at the Site Stats tab from jetpack. it was always only called “Home page” i wonder where the Archives comes from? might that be related to it?
well, i figured it out i guess.
the problem is that you have to upload a new image for the new article. choosing an already uploaded images results in not recognizing it and therefore it won’t appear, since mansion needs a thumbnail/featured image to show the post.
i always used already uploaded images for my testposts, hence the problems….
weird, but ok. glad it works again.
however, one last question: i uploaded a fresh install of the theme, so the changes i made are gone of course.
the only thing that still needs to be changed and i cant figure out is the underlining of the text in the nav box.
i want to use the code “text-decoration: none;” but i dont know where to put it.
it belongs in the style.css right?
/* Navigation styles */
#nav {padding: 10px; font-size: 13px; position: relative; padding-bottom: 40px;}
#nav li a {color: #ddd;}
#nav li a:hover {color: #fff;}
#nav .pagenav, #nav .categories, #nav .subscribe {padding-top: 10px; }
#nav span.navtitle {text-transform: uppercase; color: #999;}
#nav li ul, div.search {margin-left: 10px;}
#nav li.search, div.search {position: absolute; bottom:10px;}
#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;}
#s:hover {color:#ccc;background-color: #444;}
where?
thanks for your great help so far! i hope it’s the last time tho…my nerves…
That’s odd – I could have sworn earlier versions Mansion had a fallback image that gets shown in case there’s no image in the post. But you’re right, version 1.2.3 excludes posts from the front page if they don’t have an image. Ah well, guess now we know.
You’re right about how to remove the underlining from the menu – put this at the end of your style.css file:
.menu a {text-decoration: none;}Properties at the end of the style sheet will re-define and overwrite existing ones. Hope everything is back to normal at 2 Groove Concept
yep, everything back to normal, thanks again!
i was playing around with sidebarwidgets and was wondering if its possible to change the width of the sizebar. its currently at 200px, i tried changing that value in the stylesheet.css but the results were rather weird i.e. the widget appearing at the bottom of the post etc…
i guess i missed something?
but its not that important, so if you don’t really know how to do it dont bother wasting your time on this.
So how many images can you have ‘featured’ at any given time? Obviously only one image is ‘leading’ on the frontpage but there are other leaders within the other categories that you’d like to make bigger too, no?
Only one post will show up as featured with the large image. You can declare several posts as featured of course, but only the latest one will show up as enlarged. This can be overridden with a sticky post which will show before all other posts.
← Previous Comments
{ 1 trackback }