• site: CharlieBubblesBook.com

    Pasted, Theme functions: remove_action( ‘woocommerce_pagination’, ‘woocommerce_catalog_ordering’, 20 ); into Functions.php.

    Received, Parse error: syntax error, unexpected T_STRING in /home/charlieb/public_html/wp/wp-content/themes/twentytwelve-child/functions.php on line 6

    How do I get back? Please.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Remove the part that you posted in.

    The problem is that we don’t know what line 6 is, and even if it is that string that you have givne now, there could be an error on the line above it that’s causing this to happen. If you can’t get it to work, paste the files contents here (but remove the database connection details and any other identfing data first) so we can see what you’re dealing with.

    Thread Starter Chip G.

    (@chip-g)

    Initially, I removed the code I pasted from the Edit Themes functions.php page. Where do I find the requested file contents you would like to be pasted here?

    As it’s broken your site, you’ll need to use FTP to get onto your hosting server and download the file from there.

    When you figure i tout you will then use FTP to place the file back on the server, and that shouldl fix it all. Another option is to upload a fresh un-changed copy of the functions.php file from a new download of the theme. That will give you the same results – unless you’ve changed other things as well.

    Thread Starter Chip G.

    (@chip-g)

    <?php
    /**
    * Administration Functions
    *
    * This file is deprecated, use ‘wp-admin/includes/admin.php’ instead.
    *
    * @deprecated 2.5.0
    * @package WordPress
    * @subpackage Administration
    */

    _deprecated_file( basename(__FILE__), ‘2.5’, ‘wp-admin/includes/admin.php’ );

    /** WordPress Administration API: Includes all Administration functions. */
    require_once(ABSPATH . ‘wp-admin/includes/admin.php’);

    What file is that from? It’s not your functions.php file that is causing the error. That’s the file that you need to reset.

    /wp-content/themes/twentytwelve-child/functions.php

    Thread Starter Chip G.

    (@chip-g)

    Okay, via FTP I have accessed my ‘/wp-content/themes/twentytwelve-child/functions.php’ file which is a long page of code. What specifically am I looking for to fix the code?

    Parse error: syntax error, unexpected T_STRING in /home/charlieb/public_html/wp/wp-content/themes/twentytwelve-child/functions.php on line 6

    And as I said before:

    The problem is that we don’t know what line 6 is, and even if it is that string that you have givne now, there could be an error on the line above it that’s causing this to happen. If you can’t get it to work, paste the files contents here (but remove the database connection details and any other identfing data first) so we can see what you’re dealing with.

    Thread Starter Chip G.

    (@chip-g)

    <?php
    // Exit if accessed directly
    if ( !defined(‘ABSPATH’)) exit;

    /* Add custom functions below */
    Theme functions: remove_action( ‘woocommerce_pagination’, ‘woocommerce_catalog_ordering’, 20 );

    The problem is pretty easy to see (well, to a developer at least).

    The text of Theme functions: should not be in there. It should be this:

    <?php
    // Exit if accessed directly
    if ( !defined('ABSPATH')) exit;
    
    /* Add custom functions below */
    remove_action( 'woocommerce_pagination', 'woocommerce_catalog_ordering', 20 );
    Thread Starter Chip G.

    (@chip-g)

    Site is back up and running. Although the WooCommerce ‘Default Sorting’ dropdown is still there, which that code was to remove. No worries, after all that I’ll leave it there.

    I thank you very much. A bit overwhelming for an amateur. Glad you are here.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Functions.php downed site’ is closed to new replies.