• Hi
    this is madh, im getting this error on my website URL: https://www.pubcamino.com

    Parse error: syntax error, unexpected ‘add_action’ (T_STRING) in /****/***/-Theme/functions.php on line 1

    So please Let me know how to correct it

    thanks
    madhu

Viewing 15 replies - 1 through 15 (of 30 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Do you have FTP access?

    Thread Starter imsudhan

    (@imsudhan)

    ya

    Thread Starter imsudhan

    (@imsudhan)

    what should i do now???

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Which theme are you using?

    Thread Starter imsudhan

    (@imsudhan)

    Bistro Responsive Foodie App Theme

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Talk to your theme’s vendors for the original ‘functions.php’ of that theme and then upload that in your theme’s folder; upload and overwrite the current ‘functions.php’ file.

    Thread Starter imsudhan

    (@imsudhan)

    support team not replying properly so is there any thing i can do for my end

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Run the code from your functions.php file through a syntax checker to highlight the problem: https://www.piliapp.com/php-syntax-check/

    Thread Starter imsudhan

    (@imsudhan)

    Got this result

    Parse error: syntax error, unexpected T_STRING in CODE on line 1
    Errors parsing CODE

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What is on line 1?

    Thread Starter imsudhan

    (@imsudhan)

    <?php/* * functions and definitions *//* Code Index * * -01- SET UP FUNCTION * -02- NAV MENU ADD HOMEPAGE * -03- COMMENTS FUNCTION * *//* * -01- SET UP FUNCTION */ add_action( ‘after_setup_theme’, ‘cro_setup’ ); if ( ! function_exists( ‘cro_setup’ ) ):function cro_setup() { load_theme_textdomain( ‘localize’, get_template_directory() . ‘/languages’ ); require( get_template_directory() . ‘/inc/custom-functions.php’ ); require( get_template_directory() . ‘/inc/font-list.php’ ); require( get_template_directory() . ‘/inc/sidebar-controller.php’ ); require( get_template_directory() . ‘/inc/widgets/widget-helper.php’ ); require( get_template_directory() . ‘/inc/widgets/carousel.php’ ); require( get_template_directory() . ‘/inc/widgets/twitter.php’ ); require( get_template_directory() . ‘/inc/widgets/video.php’ ); require( get_template_directory() . ‘/inc/widgets/gallery.php’ ); require( get_template_directory() . ‘/inc/widgets/contacts.php’ ); require( get_template_directory() . ‘/inc/widgets/upcommingevents.php’ ); require( get_template_directory() . ‘/inc/widgets/newsletter.php’ ); require( get_template_directory() . ‘/inc/widgets/latestnews.php’ ); require( get_template_directory() . ‘/inc/admin/admin-functions.php’ ); require( get_template_directory() . ‘/inc/meta-boxes/cpt-init.php’ ); require( get_template_directory() . ‘/inc/apps/cal-func.php’ ); require( get_template_directory() . ‘/inc/apps/promo-func.php’ ); require( get_template_directory() . ‘/inc/framework/bookings/book-functions.php’ ); require( get_template_directory() . ‘/inc/framework/header.php’ ); require( get_template_directory() . ‘/inc/framework/menus.php’ ); require( get_template_directory() . ‘/inc/framework/ajax.php’ ); require( get_template_directory() . ‘/inc/framework/footer.php’ ); require( get_template_directory() . ‘/inc/shortcodes/shortcode-functions.php’ ); require( get_template_directory() . ‘/inc/shortcodes/shortcode-team.php’ ); require( get_template_directory() . ‘/inc/shortcodes/shortcode-gallery.php’ ); require( get_template_directory() . ‘/inc/shortcodes/shortcode-calendar.php’ ); require( get_template_directory() . ‘/inc/shortcodes/shortcode-video.php’ ); require( get_template_directory() . ‘/inc/shortcodes/shortcode-menu.php’ ); require( get_template_directory() . ‘/inc/shortcodes/shortcode-layout.php’ ); require( get_template_directory() . ‘/inc/shortcodes/shortcode-contact.php’ ); require( get_template_directory() . ‘/inc/shortcodes/shortcode-promos.php’ ); require( get_template_directory() . ‘/inc/admin/page-controller.php’); require( get_template_directory() . ‘/inc/admin/page-parts.php’); require( get_template_directory() . ‘/inc/admin/admin-helpers.php’); require( get_template_directory() . ‘/inc/admin/formbuilder.php’); require( get_template_directory() . ‘/inc/framework/bookings/book-controller.php’ ); require( get_template_directory() . ‘/inc/framework/bookings/book-parts.php’ ); require( get_template_directory() . ‘/inc/framework/bookings/bookbuilder.php’ ); require( get_template_directory() . ‘/inc/meta-boxes/cpt-functions.php’ ); require( get_template_directory() . ‘/inc/meta-boxes/cpt-builder.php’ ); require( get_template_directory() . ‘/inc/meta-boxes/cpt-tax.php’ ); require( get_template_directory() . ‘/public/style-functions.php’ ); require( get_template_directory() . ‘/public/admin/content.php’ ); require( get_template_directory() . ‘/public/meta-boxes/cpt-init.php’ ); require( get_template_directory() . ‘/public/meta-boxes/content.php’ ); require( get_template_directory() . ‘/public/meta-boxes/content-tax.php’ ); require( get_template_directory() . ‘/public/framework/images.php’ ); require( get_template_directory() . ‘/public/framework/calendar.php’ ); require( get_template_directory() . ‘/public/framework/newsletters.php’ ); require( get_template_directory() . ‘/public/framework/banner.php’ ); require( get_template_directory() . ‘/public/app/bookingform.php’ ); require( get_template_directory() . ‘/public/app/content.php’ ); add_theme_support( ‘automatic-feed-links’ ); add_theme_support(‘custom-background’); add_editor_style(); $cust_args = array( ‘width’ => 2000, ‘height’ => 480 ); add_theme_support( ‘custom-header’, $cust_args); register_nav_menu( ‘primary’, __( ‘Primary Menu’, ‘localize’ ) ); register_nav_menu( ‘secondnav’, __( ‘Primary sub menu’, ‘localize’ ) ); register_nav_menu( ‘topbar’, __( ‘Top Bar Menu’, ‘localize’ ) ); add_theme_support( ‘post-formats’, array( ‘quote’, ‘audio’, ‘video’ ) ); if ( ! isset( $content_width ) ) $content_width = 900; add_theme_support( ‘post-thumbnails’ ); add_image_size( ‘small-feature’, 500, 300 ); add_image_size( ‘carousel1’, 300, 200, true); add_image_size( ‘banner’, 400, 270, true); add_image_size( ‘carsel’, 400, 200, true);}endif; /** * -02- NAV MENU ADD HOMEPAGE */ function cro_page_menu_args( $args ) { $args[‘show_home’] = true; return $args;}add_filter( ‘wp_page_menu_args’, ‘cro_page_menu_args’ );/** * -03- COMMENTS FUNCTION */ if ( ! function_exists( ‘cro_comment’ ) ) :function cro_comment( $comment, $args, $depth ) { $GLOBALS[‘comment’] = $comment; switch ( $comment->comment_type ) : case ‘pingback’ : case ‘trackback’ :?>

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    All of that is on line 1?

    Thread Starter imsudhan

    (@imsudhan)

    ya

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Beautify your PHP and re-run it through the syntax checker.

    Thread Starter imsudhan

    (@imsudhan)

    Error on line 3: parse error, unexpected $end(), expecting ‘}’!

Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘Parse error: syntax error, unexpected 'add_action' (T_STRING)’ is closed to new replies.