Support » Fixing WordPress » Code php wrongly and wp page stop working

  • Resolved portega


    Im doing a e-commerce website, and I added this exact code

    <?php echo do_shortcode(‘[yith_woocommerce_ajax_search]’); ?>

    into functions.php

    After that, my wordpress admin page and website stop working, only showing me a blank page with no error sign, nor anything else.

    How can I fix this error?

    PS: Im a newbie, so I don’t understand that well programing language. Please have patience with me.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You do not put shortcodes in the functions.php file. You put them where you want the shortcode to run. Most likely a page or post.

    yes, thanx, now I know that. But It cost me a lot!

    Do you know how do I fix the problem? Cause I can’t get to the dashboard, everything is in blank.

    Don’t put that code into functions.php. It should go on the theme file where you want it to display, maybe page.php or single.php. If you put it after the_content() on page.php for instance, it would display on every page of your site after the content.

    If you want to use the shortcode in a specific page or post, you’d go into the control panel and edit the page, then insert just this where you want it to appear:


    Just remove it from the functions.php file. If you were editing the code through the admin, use can do what you need to by using ftp if you have access to the server.

    @graphical_force Im editing the code through the admin, and I do have access to the server. The only problem is that I don’t know how to use it very well, so i can’t quite remove it by myself.
    Could you guide me please? Like step by step instructions?

    … and once you FTP in, find your theme in wp-content/themes, download the functions.php file – make a copy as a backup – then edit it and re-upload into your theme.

    Or if you are editing a theme that is not a custom one that you wrote, you should use a child theme:

    It worked!! Thank you so much Michelle and graphical_force!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Code php wrongly and wp page stop working’ is closed to new replies.