function.php parse error
-
All i did was paste a line of code that allowed more related products on a product page. When i tried to update I got this error. I removed the code and still the same error. I even removed all the coding from the function.php page and still get this error. I’m confused, especially since I only know enough php to modify, not to hard code or troubleshoot.
Parse error: syntax error, unexpected ‘<‘ in /home/content/64/10994364/html/website/wp-content/themes/twentyfourteen-child/functions.php on line 67
This is my entire function.php page:
<?php // Remove old copyright text add_action( 'init' , 'mh_remove_copy' , 15 ); function mh_remove_copy() { remove_action( 'attitude_footer', 'attitude_footer_info', 30 ); } // Add my own copyright text add_action( 'attitude_footer' , 'mh_footer_info' , 30 ); function mh_footer_info() { $output = '<div class="copyright">'.'Copyright © [the-year] [site-link] All Rights Reserved'.'</div><!-- .copyright -->'; echo do_shortcode( $output ); } add_filter( 'woocommerce_product_tabs', 'sb_woo_remove_reviews_tab', 98); function sb_woo_remove_reviews_tab($tabs) { unset($tabs['reviews']); return $tabs; } /** * WooCommerce Extra Feature * -------------------------- * * Register a shortcode that creates a product categories dropdown list * * Use: [product_categories_dropdown orderby="title" count="0" hierarchical="0"] * */ add_shortcode( 'product_categories_dropdown', 'woo_product_categories_dropdown' ); function woo_product_categories_dropdown( $atts ) { extract(shortcode_atts(array( 'count' => '0', 'hierarchical' => '0', 'orderby' => '' ), $atts)); ob_start(); $c = $count; $h = $hierarchical; $o = ( isset( $orderby ) && $orderby != '' ) ? $orderby : 'order'; // Stuck with this until a fix for http://core.trac.wordpress.org/ticket/13258 woocommerce_product_dropdown_categories( $c, $h, 0, $o ); ?> <script type='text/javascript'> /* <![CDATA[ */ var product_cat_dropdown = document.getElementById("dropdown_product_cat"); function onProductCatChange() { if ( product_cat_dropdown.options[product_cat_dropdown.selectedIndex].value !=='' ) { location.href = "<?php echo home_url(); ?>/?product_cat="+product_cat_dropdown.options[product_cat_dropdown.selectedIndex].value; } } product_cat_dropdown.onchange = onProductCatChange; /* ]]> */ </script> <?php return ob_get_clean(); }Any help is appreciated.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘function.php parse error’ is closed to new replies.