Quite a newbie!
When I validate the code, I get the same error. Not a coder so not sure if there is a bracket, etc duplicated or missing. Many thanks in advance!!
code below - syntax error, unexpected $end on line 17
<?php
wp_enqueue_script('jquery');
add_theme_support('menus');
add_theme_support('post-thumbnails');
add_action('thesis_hook_before_post','facebook_like_button');
function facebook_like_button(){
global $post;
?>
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=standard&show_faces=false&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:60px"></iframe>
<?php
}
register_nav_menu('utility-menu', 'Utility Menu');
register_sidebar(array(
'name' => 'Today\'s Special',
'id' => 'todays-special',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h4 class="widgettitle">',
'after_title' => '</h4>',
));
register_sidebar(array(
'name' => 'Footer Left Section',
'id' => 'footer-left',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h4 class="widgettitle">',
'after_title' => '</h4>',
));
register_sidebar(array(
'name' => 'Footer Right Section',
'id' => 'footer-right',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h4 class="widgettitle">',
'after_title' => '</h4>',
));
register_sidebar(array(
'name' => 'Rotator Section',
'id' => 'rotator-section',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '',
'after_title' => '',
));
function register_post_types() {
//Slider
$slider_labels = array(
'name' => 'Slides',
'singular_name' => 'Slide',
'add_new' => 'Add New',
'add_new_item' => 'Add New Slide',
'edit_item' => 'Edit Slide',
'new_item' => 'New Slide',
'view_item' => 'View Slide',
'search_items' => 'Search Slides',
'not_found' => 'No slides found',
'not_found_in_trash' => 'No slides found in Trash',
'parent_item_colon' => ''
);
$slider_args = array(
'labels' => $slider_labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'query_var' => true,
'_edit_link' => 'post.php?post=%d',
'capability_type' => 'post',
'hierarchical' => false,
'menu_position' => null,
'supports' => array('title','author', 'editor', 'page-attributes')
);
register_post_type('slide', $slider_args);
}
add_action('init', 'register_post_types');
function custom_bookmark_links() {
global $post;
?>
<ul class="bookmark_links">
<li><a rel="nofollow" href="http://delicious.com/save?url=<?php urlencode(the_permalink()); ?>&title=<?php urlencode(the_title()); ?>" onclick="window.open('http://delicious.com/save?v=5&noui&jump=close&url=<?php urlencode(the_permalink()); ?>&title=<?php urlencode(the_title()); ?>', 'delicious', 'toolbar=no,width=550,height=550'); return false;" title="Bookmark this post on del.icio.us">Bookmark this article on Delicious</a></li>
</ul>
<?php
}
function print_scripts_and_styles() {
?>
<link rel="shortcut icon" href="<?php bloginfo('stylesheet_directory'); ?>/custom/images/favicon.ico" />
<script src="<?php bloginfo('stylesheet_directory'); ?>/custom/js/cufon-yui.js" type="text/javascript"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/custom/js/Hand_400.font.js" type="text/javascript"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/custom/js/png-fix.js" type="text/javascript"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/custom/js/fn.js" type="text/javascript"></script>
<?php
print_ie6_styles();
}
//IE6 Styles
function print_ie6_styles() {
$ie_css_file = dirname(__FILE__) . '/ie6.css';
if (!file_exists($ie_css_file)) {
return;
}
$ie6_hacks = file_get_contents($ie_css_file);
if (empty($ie6_hacks)) {
return;
}
echo '
<!--[if IE 6]>
<style type="text/css" media="screen">';
echo "\n\n" . str_replace(
'css/images/',
get_bloginfo('stylesheet_directory') . '/custom/images/',
$ie6_hacks
);
echo '
</style>
<![endif]-->';
}
add_action('wp_head', 'print_scripts_and_styles');
//Moving Navigation
remove_action('thesis_hook_before_header', 'thesis_nav_menu');
add_action('thesis_hook_after_header', 'thesis_nav_menu');
function add_content_wrapper_before() {
echo '<div id="content_outer"><div id="content_inner">';
}
add_action('thesis_hook_before_content_box', 'add_content_wrapper_before');
function add_content_wrapper_after() {
echo '<div class="cl"> </div></div></div>';
}
add_action('thesis_hook_after_content_box', 'add_content_wrapper_after');
function add_header_contents() {
?>
<div class="contact-box">
<?php wp_nav_menu('menu=utility-navigation&fallback_cb=&container=&menu_class=utility_menu'); ?>
<div class="cl"> </div>
<div class="fr"> <span class="btn"></span> <a href="http://cannabistraininguniversity.com/cannabis-industry-online-training/">GET CERTIFIED TODAY!</a> </div>
<div class="cl"> </div>
</div>
<?php
}
add_action('thesis_hook_header', 'add_header_contents');
function add_feature_box() {
query_posts('post_type=slide&showposts=1000&orderby=menu_order&order=ASC');
?>
<div class="feature-box" id="featured-slider">
<?php if (have_posts()): $loopID = 0; ?>
<?php while(have_posts()): the_post(); $loopID++; ?>
<div class="featured-item" <?php echo ($loopID == 1) ? 'style="display: block"' : ''; ?>>
<?php the_content(); ?>
</div>
<?php endwhile; ?>
<?php endif ?>
<?php wp_reset_query(); ?>
</div>
<div class="today-special-box">
<h3>Today special</h3>
<?php dynamic_sidebar('todays-special'); ?>
</div>
<?php
}
add_action('thesis_hook_feature_box', 'add_feature_box');
remove_action('thesis_hook_footer', 'thesis_attribution');
function add_footer_contents() {
?>
<div class="l-area">
<?php dynamic_sidebar('footer-left'); ?>
</div>
<div class="r-area">
<div class="social"> </div>
</div>
<?php dynamic_sidebar('footer-right') ?>
</div>
<div class="cl"> </div>
<?php
}
add_action('thesis_hook_footer', 'add_footer_contents');
function superfish() {
?>
<!-- superfish jquery menu -->
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/custom/js/hoverIntent.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/custom/js/superfish.js"></script>
<script type="text/javascript">
// initialise plugins
jQuery(function(){
jQuery('ul.menu').superfish();
});
</script>
<?php
}
add_action('thesis_hook_after_html','superfish');
/* superfish stylesheet */
2 function superfish_stylesheet() {
3 ?>
4
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/custom/css/superfish.css" media="screen">
5
<?php
6 }
7
8 add_action('wp_head','superfish_stylesheet');
//Shortcodes
function shortcode_attend_button($atts, $content) {
if (!isset($atts['link'])) {
return;
}
return '<a class="attend" href="' . $atts['link'] . '"> </a>';
}
add_shortcode('attend', 'shortcode_attend_button');
function shortcode_register_button($atts, $content) {
if (!isset($atts['link'])) {
return;
}
return '<a class="btn" href="' . $atts['link'] . '"> </a>';
}
add_shortcode('register', 'shortcode_register_button');
//Shortcodes in widgets
add_filter('widget_text', 'do_shortcode');
?>