Topic: [RESOLVED] How to have different layouts for the main page and posts?

I went ahead and purchased the Classical Gamer theme because I think this will be the way to go for my site re-vamp.  I've been playing around with it and setup a testing site; and got it pretty close to what I have in mind for the new and improved site.

I do have one question that I can't seem to figure out or find any answers online for.  As the title states, I would like to have a different page layout for my main page than the rest of the pages.  How can I accomplish this?

For example, I like the home page like it is set up now: http://myworthlesscrap.com/WordPress/

But I don't like how my posts pages look: http://myworthlesscrap.com/WordPress/?p=32

The post pages look to jumbled and the image gets cut off at the bottom.  How can I have the 3 column layout for the main page, but have a 2 column layout for the rest?

Thanks!

Check out my movie website built using Arras: http://AfterCredits.com

Re: [RESOLVED] How to have different layouts for the main page and posts?

You could play around with the way in which I describe how to add "Full Width Posts/Pages" in the following topic. A combination of my alternate solution and some CSS adjustments can probably get the job done.

http://www.arrastheme.com/forums/topic3 … ather.html

Re: [RESOLVED] How to have different layouts for the main page and posts?

dgodfather wrote:

You could play around with the way in which I describe how to add "Full Width Posts/Pages" in the following topic. A combination of my alternate solution and some CSS adjustments can probably get the job done.

http://www.arrastheme.com/forums/topic3 … ather.html

Thanks, I'll have to play around with that and see if I can get it working.

Check out my movie website built using Arras: http://AfterCredits.com

Re: [RESOLVED] How to have different layouts for the main page and posts?

I played around with it a bit and kinda got it to work like I was hoping.  But I'm still not 100% there.  If you could check out this page: http://myworthlesscrap.com/WordPress/?p=151, you'll see how I'd like it to work.  But if you click on the "Show" button, the image gets cut off.

This page isn't exactly 100% what I'm looking for, but it's the best I can come up with to get it all to fit.  Any other ideas would be appreciated!

Last edited by ned4spd8874 (2011-02-10 19:03:46)

Check out my movie website built using Arras: http://AfterCredits.com

Re: [RESOLVED] How to have different layouts for the main page and posts?

Did you end up creating a custom post template?

Re: [RESOLVED] How to have different layouts for the main page and posts?

dgodfather wrote:

Did you end up creating a custom post template?

Yeah, I tried that but couldn't get it figured out.  It kept filling the entire width and when I tried to put in my sidebar, it just overlays everything making it a jumbled mess.

Check out my movie website built using Arras: http://AfterCredits.com

Re: [RESOLVED] How to have different layouts for the main page and posts?

Give me a bit and I'll see if I can't put something together for you on my dev site.

Re: [RESOLVED] How to have different layouts for the main page and posts?

dgodfather wrote:

Give me a bit and I'll see if I can't put something together for you on my dev site.

That would be awesome!  I'll take all the help I can get.  Thanks!

Check out my movie website built using Arras: http://AfterCredits.com

Re: [RESOLVED] How to have different layouts for the main page and posts?

This will be a bit more extensive then I had originally thought, but I'll do my best to explain when I can. I'll update this post early sometime this weekend.

Re: [RESOLVED] How to have different layouts for the main page and posts?

dgodfather wrote:

This will be a bit more extensive then I had originally thought, but I'll do my best to explain when I can. I'll update this post early sometime this weekend.

I'll appreciate any help you could offer.

Check out my movie website built using Arras: http://AfterCredits.com

Re: [RESOLVED] How to have different layouts for the main page and posts?

I got it!

I found this post: http://www.arrastheme.com/forums/topic3 … pages.html, which lead me in the right direction.

The layout settings need to be 3 column, and then I modified this line in the styles.php file:

function arras_add_layout_css() {
    global $arras_registered_alt_layouts;
    
    if ( count($arras_registered_alt_layouts) > 0 ) {
        
        if ( defined('ARRAS_FORCE_LAYOUT') ) {
            $layout = ARRAS_FORCE_LAYOUT;
        } 
        elseif(is_single()) {
                    $layout = "2c-l-fixed";
        }
        else {
            $layout = arras_get_option('layout');
        }

Adding the elseif for is_single seems to work.  I tried setting the layout to 2 column and then changing that line to is_home, but that didn't have the same effect.

I know modifying these files aren't recommended though, so if anyone knows a way to get this sort of setting working in the user.css, please let me know.

Check out my movie website built using Arras: http://AfterCredits.com

Re: [RESOLVED] How to have different layouts for the main page and posts?

Sorry for the late post. I think yours is the way to go, but may not be supported in future updates. My solution ended up being done by using a combination of two plugins. Custom Post Templates and Widget Context. My solution is upgrade friendly, but requires the two plugins.

Basically you use the Custom Post Template plugin to create the page with the styling desire and then use widget context to hide widgets on the particular pages you need it for.

Re: [RESOLVED] How to have different layouts for the main page and posts?

dgodfather wrote:

Sorry for the late post. I think yours is the way to go, but may not be supported in future updates. My solution ended up being done by using a combination of two plugins. Custom Post Templates and Widget Context. My solution is upgrade friendly, but requires the two plugins.

Basically you use the Custom Post Template plugin to create the page with the styling desire and then use widget context to hide widgets on the particular pages you need it for.

I tried that approach initially, but if I remember correctly, it was the column sizes that was messing me up.  I could make it look like it was only 2 columns, but my images would still be cut off because the one side was still being reserved for widgets.

Check out my movie website built using Arras: http://AfterCredits.com

Re: [RESOLVED] How to have different layouts for the main page and posts?

You can fix that problem by editing base.css

Change:

.single .post .entry-photo, .single-post .entry-photo    { overflow: hidden; }

To:

.single .post .entry-photo, .single-post .entry-photo    { overflow: visible; }

Look @ http://profaneentertainment.com/dev/ and then http://profaneentertainment.com/dev/post/hello-world

That was accomplished using the methods described above.

All things can be done with patience, trial & error.

Re: [RESOLVED] How to have different layouts for the main page and posts?

dgodfather wrote:

You can fix that problem by editing base.css

Change:

.single .post .entry-photo, .single-post .entry-photo    { overflow: hidden; }

To:

.single .post .entry-photo, .single-post .entry-photo    { overflow: visible; }

Look @ http://profaneentertainment.com/dev/ and then http://profaneentertainment.com/dev/post/hello-world

That was accomplished using the methods described above.

All things can be done with patience, trial & error.

Ah, okay I see.  Cool, thanks!

Check out my movie website built using Arras: http://AfterCredits.com