function.php problem | Site down!

Discussion in 'Andrina WordPress Theme' started by rpickett578, Jan 24, 2014.

  1. rpickett578

    rpickett578 New Member

    Joined:
    Apr 21, 2013
    Messages:
    13
    Likes Received:
    0
    There is a problem with the function.php file on our Andrina Pro Theme.

    I wanted to add the function of putting shortcode for forms in the sidebar.

    I added the wording to allow this and recieved an error. I was unsure what the problem was so I deleted the wording and our site now shows: "Parse error: syntax error, unexpected '}' in /home/rpickett578/cahillplumbingandheating.com/wp-content/themes/andrinatheme/functions.php on line 94"

    I then deleted the entire function.php file and copy and pasted a new Andrina pro theme function.php and the same error occured when I tried to update the file! I'm at a loss and I can't access my site now. What should I do?
     
  2. rpickett578

    rpickett578 New Member

    Joined:
    Apr 21, 2013
    Messages:
    13
    Likes Received:
    0
    PHP:
    <?php
     
    include_once TEMPLATEPATH '/functions/inkthemes-functions.php';
    $functions_path TEMPLATEPATH '/functions/';
    /* These files build out the options interface.  Likely won't need to edit these. */
    require_once ($functions_path 'admin-functions.php');  // Custom functions and plugins
    require_once ($functions_path 'admin-interface.php');  // Admin Interfaces (options,framework, seo)
    /* These files build out the theme specific options and associated functions. */
    require_once ($functions_path 'theme-options.php');  // Options panel settings and custom settings
    require_once ($functions_path 'dynamic-image.php');
    require_once (
    $functions_path 'shortcodes.php');
    ?>
    <?php
    /* ----------------------------------------------------------------------------------- */
    /* Styles Enqueue */
    /* ----------------------------------------------------------------------------------- */
     
    function inkthemes_add_stylesheet() {
     
      if(
    inkthemes_get_option('inkthemes_altstylesheet')!='Default'){ 
      
    wp_enqueue_style('andrina_lanstylesheet'get_template_directory_uri() . "/color/" inkthemes_get_option('inkthemes_altstylesheet') . ".css"'''''all');
    }
      if(
    inkthemes_get_option('andrina_lanstylesheet')!='Default'){ 
      
    wp_enqueue_style('coloroptions'get_template_directory_uri() . "/color/" inkthemes_get_option('andrina_lanstylesheet') . ".css"'''''all');
    }
    wp_enqueue_style('shortcodes'get_template_directory_uri() . "/css/shortcode.css"'''''all'); 
    }
     
     
    add_action('init''inkthemes_add_stylesheet');
    /* ----------------------------------------------------------------------------------- */
    /* jQuery Enqueue */
    /* ----------------------------------------------------------------------------------- */
     
    function inkthemes_wp_enqueue_scripts() {
        if (!
    is_admin()) {
            
    wp_enqueue_script('jquery');
            
    wp_enqueue_script('inkthemes-ddsmoothmenu'get_template_directory_uri() . '/js/ddsmoothmenu.js', array('jquery'));
            
    wp_enqueue_script('inkthemes-slides'get_template_directory_uri() . '/js/slides.min.jquery.js', array('jquery'));
        if (
    get_option('andrina_lanstylesheet')!= 'rtl') {
            
    wp_enqueue_script('inkthemes-cunfon-yui'get_template_directory_uri() . '/js/cufon-yui.js', array('jquery'));
        }   
            
    wp_enqueue_script('inkthemes-zoombox'get_template_directory_uri() . '/js/zoombox.js', array('jquery'));
            
    wp_enqueue_script('inkthemes-validate'get_template_directory_uri() . '/js/jquery.validate.min.js', array('jquery'));
            
    wp_enqueue_script('inkthemes-custom'get_template_directory_uri() . '/js/custom.js', array('jquery'));
        } elseif (
    is_admin()) {
           
        }
    }
    add_action('wp_enqueue_scripts''inkthemes_wp_enqueue_scripts');
    /* ----------------------------------------------------------------------------------- */
    /* Custom Jqueries Enqueue */
    /* ----------------------------------------------------------------------------------- */
    function inkthemes_custom_jquery(){
        
    wp_enqueue_script('mobile-menu'get_template_directory_uri() . "/js/mobile-menu.js", array('jquery'));
    }
    add_action('wp_footer','inkthemes_custom_jquery');
    //Front Page Rename
    $get_status inkthemes_get_option('re_nm');
    $get_file_ac TEMPLATEPATH '/front-page.php';
    $get_file_dl TEMPLATEPATH '/front-page-hold.php';
    //True Part
    if ($get_status === 'off' && file_exists($get_file_ac)) {
        
    rename("$get_file_ac""$get_file_dl");
    }
    //False Part
    if ($get_status === 'on' && file_exists($get_file_dl)) {
        
    rename("$get_file_dl""$get_file_ac");
    }
     
    //
    function inkthemes_get_option($name) {
        
    $options get_option('inkthemes_options');
        if (isset(
    $options[$name]))
            return 
    $options[$name];
    }
     
    //
    function inkthemes_update_option($name$value) {
        
    $options get_option('inkthemes_options');
        
    $options[$name] = $value;
        return 
    update_option('inkthemes_options'$options);
    }
     
    //
    function inkthemes_delete_option($name) {
        
    $options get_option('inkthemes_options');
        unset(
    $options[$name]);
        return 
    update_option('inkthemes_options'$options);
    }
     
    ?>
     
  3. rpickett578

    rpickett578 New Member

    Joined:
    Apr 21, 2013
    Messages:
    13
    Likes Received:
    0
    ^^^ is the current function.php file
     
  4. rpickett578

    rpickett578 New Member

    Joined:
    Apr 21, 2013
    Messages:
    13
    Likes Received:
    0
  5. Nitesh

    Nitesh Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    5,165
    Likes Received:
    160
    Hello,

    Please download "functions.php" file attached and replace it with your current file.

    Thanks & Regards
    Nitesh Raghuwanshi
     

    Attached Files:

  6. bobvonelgg

    bobvonelgg New Member

    Joined:
    Aug 5, 2013
    Messages:
    2
    Likes Received:
    0
    Hi, has this problem been resolved? Did it work?
     
  7. rpickett578

    rpickett578 New Member

    Joined:
    Apr 21, 2013
    Messages:
    13
    Likes Received:
    0
    Hi, yes it worked. I had to access the site through my ftp and edit the function.php file. It may take some time for the site to update and show that its corrected but once you make the edits just sit tight and know it will be all fixed once the site updates
     
  8. Nitesh

    Nitesh Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    5,165
    Likes Received:
    160
    Hello,

    Instead of going through FTP.
    You can use "wp-editor" plugin.
    It will allow you to edit internal files via dashboard.
    Download link.
    http://wordpress.org/plugins/wp-editor/


    Thanks & Regards
    Nitesh Raghuwanshi
     

Share This Page