WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been trying to use the front page from the Autofocus theme in a different theme by copy pasting the code from index.php in the Autofocus theme to my new archive.php file. I have also copied the related functions from functions.php from Autofocus, I also tried to get some of the css over to the new theme.

I have tried this for a long time and with multiple tweaks but I can't get it to work. I get both images and text, but not in the same style as in the Autofocus theme, and definitely not with the cropping autofocus has on its front screen.

Am I missing something here? Shouldn't it work if I copy the whole fuctions.php in to the new one and copy all the css?

share|improve this question
up vote 1 down vote accepted

I think if you just copy-paste the functions and styles, you're still missing a lot of code in the actual templates (those PHP files). Like others said, you might be missing classes... you might also be missing entire DIVs and other stuff, too, though.

share|improve this answer

Is the copied Autofocus CSS taking any effect at all? You might have to place it beneath your theme's other CSS so it gets priority.

share|improve this answer
Yes, it takes effect. – Anders Jan 20 '11 at 21:02

It's really hard to say what is wrong, when we are working blind. Give us a screenshot or an URL to visit so we can help you debug.

On a general basis, copy-pasting a theme page to another theme is very "difficult". Not impossible to do, of course, but it's usually not just copy-pasting and expect it to work.

share|improve this answer

Are you aware of that Autofocus is based on Thematic? Thematic injects a lot more css classes. I'm not sure if Autofocus just cogs up completely without Thematic or if it just does everything it can do without. So check if you go Thematic installed.

To do a proper job, though, you'll have to really dig into how Autofocus processes stuff in it's functions.php...like not just copy-paste, but understand what it's doing when.

share|improve this answer

Your Answer


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.