Closed randomfreeform closed 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.
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!
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.
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
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...
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
Perfectly clear. MANY thanks!
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'?)
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
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?
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.
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
You're welcome. Glad to help out
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