Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New Coder
    Join Date
    Jul 2012
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question need help :Wordpress PHP Error Code

    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



    <?php
    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
    */
    do_action('avia_action_frontpage_check');


    /*
    * 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' );


    ?>

  • #2
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,546
    Thanks
    45
    Thanked 259 Times in 256 Posts
    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?

  • #3
    New Coder
    Join Date
    Jul 2012
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Also I installed it on online server it gives me this error as well

  • #4
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,546
    Thanks
    45
    Thanked 259 Times in 256 Posts
    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.

  • #5
    New Coder
    Join Date
    Jul 2012
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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

  • #6
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,546
    Thanks
    45
    Thanked 259 Times in 256 Posts
    I have no idea what that means.

  • #7
    New Coder
    Join Date
    Jul 2012
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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

  • #8
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,546
    Thanks
    45
    Thanked 259 Times in 256 Posts
    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.

  • #9
    New Coder
    Join Date
    Jul 2012
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts
    yes the former error was in wamp Server , and it gives me error in the same line online !

  • #10
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,546
    Thanks
    45
    Thanked 259 Times in 256 Posts
    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?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •