View Full Version : need help :Wordpress PHP Error Code

07-20-2012, 04:39 PM
When I install the Wordpress Template it gives me an error :

Fatal error: Call to undefined function do_action() in C:\wamp\www\index.php on line 11

and the line 11 is the one in Black font below

This is all the code in index.php file

global $avia_config;

* check which page template should be applied:
* checks for dynamic pages as well as for portfolio, fullwidth, blog, contact and any other possibility :)
* Be aware that if a match was found another template wil be included and the code bellow will not be executed
* the function avia_get_frontpage_template() located at the top of includes/helper-template-logic.php is
* responsible for all those checks

* If the frontpage check above doesnt redirect the site to a static page or dynamic template show the default blog

get_template_part( 'template', 'blog' );


07-20-2012, 05:37 PM
Uh... This looks like its in your WAMP root, not a wordpress install... it doesn't know what do_action is because it can't know what do_action is. It doesn't look like you've installed a template at all... you didn't place this in the theme's folder?

07-20-2012, 05:54 PM
Also I installed it on online server it gives me this error as well

07-20-2012, 06:09 PM
You put it in the themes folder under wp-content? Just copied/pasted the files? Because the error you're showing isn't in any theme file, its in the WAMP root file, which shouldn't be touched unless you know what you're doing, and if you put WP in your root, its the WP index file, which shouldn't be touched unless you REALLY know what you're doing.

The error is coming up because the file has no idea what those functions are.

07-20-2012, 06:23 PM
Sir , I got all the raw template items without dealing it with Wamp it gives me the error in line 11 , when i install it online

07-20-2012, 07:01 PM
I have no idea what that means.

07-20-2012, 07:58 PM
I meant I took all the template files and uploaded it to on line server , and the error is as it is in line 11

07-20-2012, 08:05 PM
But you're showing an error on the windows machine? I'm confused... is the error on the server or locally? Did it ever work right? I can't imagine it did given the information you've presented.

07-20-2012, 08:14 PM
yes the former error was in wamp Server , and it gives me error in the same line online !

07-20-2012, 08:19 PM
Right, so your code never worked... why did you think if it wasn't working locally it would work on the server?

Again, the file you indicated the error was on should not have been edited in the manner you did. I'm not sure what you were trying to do, or what instructions you followed, because installing a theme on wordpress is as simple as copying a folder... you should reinstall wordpress and try again.

What were you trying to do, and what steps did you take?