"Parse Error syntax error, unexpected T_IF…" for PHP newbie
-
Hi Guys,
I was just copying and pasting some code into my custom_functions.php, and went to delete exactly what I had just pasted in. I must have accidentally deleted a character somewhere, because now I get the above syntax error. I know absolutely nothing about php, can anyone point out what’s wrong? Here is the code, supposedly the error is on on line 26. I am using Thesis.
<?php // Using hooks is absolutely the smartest, most bulletproof way to implement things like plugins, // custom design elements, and ads. You can add your hook calls below, and they should take the // following form: // add_action('thesis_hook_name', 'function_name'); // The function you name above will run at the location of the specified hook. The example // hook below demonstrates how you can insert Thesis' default recent posts widget above // the content in Sidebar 1: // add_action('thesis_hook_before_sidebar_1', 'thesis_widget_recent_posts'); // this is how to remove the comments hook remove_action('thesis_hook_after_post','thesis_comments_link'); function full_width_nav() { ?> <div id="nav_area" class="full_width"> <div class="page"> <?php thesis_nav_menu(); ?> </div> </div> <?php } remove_action('thesis_hook_before_header', 'thesis_nav_menu'); add_action('thesis_hook_before_content_area', 'full_width_nav') function custom_bookmark_links() { global $post; ?> <ul class="bookmark_links"> <li><a rel="nofollow" href="https://delicious.com/save?url=<?php urlencode(the_permalink()); ?>&title=<?php urlencode(the_title()); ?>" onclick="window.open('https://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 custom_bookmark_links() - outputs an HTML list of bookmarking links * NOTE: This only works when called from inside the WordPress loop! * SECOND NOTE: This is really just a sample function to show you how to use custom functions! * * @since 1.0 * @global object $post */
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘"Parse Error syntax error, unexpected T_IF…" for PHP newbie’ is closed to new replies.