Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a specific category who's page I'd like to look like the home page of my site, with all the nice sliding featured stories, etc. If I create a file category-slug.php, can I do some sort of include of the index template?

If it helps, I'm using wootheme's FlashNews theme.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

A somewhat ghetto but fast way to do this is to just use get_template_part, for example,

get_template_part('index');

A better use for it is to grab "parts" of your template and not a whole index, but it still works.

http://codex.wordpress.org/Function_Reference/get_template_part

share|improve this answer

Yes, that should work. I'm not familiar with the theme you reference, but in most if you copy over index.php and rename it category-slug.php you'd have an excellent starting place. You may have to adjust some of the queries for featured sliders etc.

share|improve this answer
    
Is there a way to actually include the index.php template, rather than copy and paste? –  hookedonwinter Sep 14 '11 at 23:46
    
I suppose you could create a blank category-slug.php page and then use include('index.php'); to reference the index file, though I've never tried it. –  Michelle Sep 15 '11 at 1:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.