milohuang / reverie

Reverie is a versatile HTML5 responsive WordPress framework based on ZURB's Foundation.
http://theakiba.com/reverie/
MIT License
918 stars 196 forks source link

Make a Category page full width? #181

Closed randomfreeform closed 11 years ago

randomfreeform commented 11 years ago

Before I go and hack things to death for hours on end does anyone have any tips on the best way to make a category page be full width?

(I don't want this for EVERY Category page but on just 1 or 2 of them. I imagine a page template might be the route. )

Thanks! R

awshout commented 11 years ago

Copy archive.php, rename it to category.php ( or category-slug.php or category-id.php ), remove the sidebar and adjust columns to large-12. You could also add single_cat_title() and category_description() to the template.

http://codex.wordpress.org/Category_Templates

randomfreeform commented 11 years ago

OooOO! Done, I used the slug name, was so simple. Thanks a ton awshout!!!!!!!

Last question here.. Any thoughts on how to title things so it affects the default 'home' page, i.e., 'mysite.com' ?

(Details - I set my default home in Reveries 'Theme > Customize > Static Front Page > Front Page Displays > Your Latest Posts'.... I know these are my posts that are set to category item 'home'... but my modified 'category-home.php' only effects the url 'mysite.com/home' and not mysite.com. I tried 'mysite.com/blog' but that didn't work...) Thanks again!

randomfreeform commented 11 years ago

OK, figured out how to get full width for the default home page... I just took out <?php get_sidebar(); ?> from index.php (and changed large columns to 12).

Done.

awshout commented 11 years ago

Sorry, I think you lost me there.

When you set your front page to display "Your latest posts" it utilizes index.php ( or home.php if it exists ) for the front page.

If you set a static page, the Front page will be whatever page template is set for the selected page ( or front-page.php if it exists ). The selected page for the Posts page will then use index.php ( or home.php ).

index.php is the default fallback for any page without a set template. Modifying index.php will change the layout of all pages relying on it.

I suggest taking a look at this: http://codex.wordpress.org/Template_Hierarchy

randomfreeform commented 11 years ago

Hmmm, I thought I found a simple fix for the default home page set to 'latest posts'. Is there a better but simple way to do this?

I'll read the informative looking Template_Hierarchy page (yes, I'm a new-mid level trouble-making WP guy :) . Thanks again awshout...

awshout commented 11 years ago

I would create a front-page.php. You could do this by copying the index.php if you want. Alter it to your liking. Create 2 pages (ie Home and Blog ) Go to Settings > Reading, select Front page displays: A static page. Choose your Home page for Front page and Blog for Posts page. Home will use front-page.php and Blog will use index.php

randomfreeform commented 11 years ago

Perfectly clear. MANY thanks!

randomfreeform commented 11 years ago

I tried it but I only got a blank page with 'home' as my title... Hmmm, maybe you made a small mistake? Shouldn't 'I would create a home-page.php'... match 'Home will use front-page.php' ??

(Curious... so WP knows to look for home-page.php and use it's formatting for a page titled 'home'?)

awshout commented 11 years ago

Oh yes, sorry! I meant front-page.php

(edited previous post)

It knows to look for front-page.php when a static page is set for Front page

randomfreeform commented 11 years ago

No prob, after some trial n error I figured out it was front-page.php and things are now working, thanks... BUT, I don't need to change the Settings from 'Your latest posts' to static, etc... If I do I still get a blank page titled 'home'. I guess if it works I'm ok?

awshout commented 11 years ago

Your'e right! I've been working with different templates for too long. :laughing: You don't need to set it as a static page. However, I don't think it should give you a blank page if you do.

randomfreeform commented 11 years ago

Coul..

(BTW, I think the blank page is simply becuse I made the Settings point to a page called 'home' that I didn't put any content in.) Thanks again!!!! You really saved me hours of muckin things up! R

awshout commented 11 years ago

You're welcome. Glad to help out