URGENT! Someone help me with this syntax error please!

7 replies
  • WEB DESIGN
  • |
Hello Warriors,
I am really hoping someone here will be able to help me! I am working on a website for a client and they already had a website running on the wordpress platform using the Thesis Theme. I went into the customer _functions.php folder under the editor. All I changed was the copyright date from 2009 to 2011 and when I clicked update I got this message:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/content/g/a/r/garybryan/html/wp-content/themes/thesis/custom/custom_functions.php on line 23


I have seen this before and I know that it is telling me that a comma or semilcolon is missing somewhere (supposedly the 23rd line)b but I have reviewed the code many times and cannot find the error! I cannot even log into the admin panel on Wordpress.

Here is line 23 :

echo "<p><small>Copyright &copy; 2011 <a href=\"http://whatstoxic.com.com/\" title=\"Whatstoxic.com\">WhatsToxic.com</a> - Dr Gary Ginsberg | Built with <a href=\"http://diythesis.com/\" title=\"Wordpress Thesis Theme by DIY Themes\">Thesis Theme</a> by <a href=\"http://www.konakiko.com/hireme/\"Title=\"Websites by konakiko\">konakiko</a> | <a href=\"http://whatstoxic.org/wp-admin/\" title=\"login\">Login</a></small></p>";



I do not see an error here. But another set of eyes might! My client is getting anxious because they went to check the site's progress and all they are getting is the error message instead of seeing their site.

If it will help at all, this is the entire set of coding from the custom_functions.php folder.

Please, if php is your area of expertise, I would appreciate your help so very much.

THE WHOLE CODE:

<?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
*/
function custom_bookmark_links() {
global $post;
?>
<ul class="bookmark_links">
<li><a rel="nofollow" href="http://delicious.com/save?url=<?php urlencode(the_permalink()); ?>&amp;title=<?php urlencode(the_title()); ?>" onclick="window.open('http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url=<?php urlencode(the_permalink()); ?>&amp;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
}
/* To add my own footer */
function rl_footer() {
echo "<p><small>Copyright &copy; 2011 <a href=\"http://whatstoxic.com.com/\" title=\"Whatstoxic.com\">WhatsToxic.com</a> - Dr Gary Ginsberg | Built with <a href=\"http://diythesis.com/\" title=\"Wordpress Thesis Theme by DIY Themes\">Thesis Theme</a> by <a href=\"http://www.konakiko.com/hireme/\"Title=\"Websites by konakiko\">konakiko</a> | <a href=\"http://whatstoxic.org/wp-admin/\" title=\"login\">Login</a></small></p>";
}
remove_action('thesis_hook_footer', 'thesis_attribution');
add_action('thesis_hook_footer', 'rl_footer');

/* To add Recent Posts widget in sidebar 2 */
function r2_recent_posts() {
thesis_widget_recent_posts('Articles', 'Articles by Dr. G', 8);
thesis_widget_recent_posts('in-the-news', 'In the News', 8);
}
add_action('thesis_hook_after_sidebar_2', 'r2_recent_posts');

/* move navigation bar v1.3 ---*/
remove_action('thesis_hook_before_header', 'thesis_nav_menu');
add_action('thesis_hook_after_header', 'thesis_nav_menu');
#error #syntax #urgent
  • Profile picture of the author KirkMcD
    Are you sure that's the right file?
    Everything above parses fine.
    {{ DiscussionBoard.errors[3254514].message }}
    • Profile picture of the author prmoise76
      Originally Posted by KirkMcD View Post

      Are you sure that's the right file?
      Everything above parses fine.
      Hi Kirk,

      That is the only file that I manually changed. But now I cannot access the Wordpress Admin Panel. The error message says that it is located in the custom_functions.php. I pasted the entire code for that file. So the error would have to be somehwhere in there right? :confused:

      I dont even know where else to being looking since I have been working on so many areas of the site. Is there any easy way to find out where an error would be?

      Thanks,
      Pierre
      {{ DiscussionBoard.errors[3254723].message }}
      • Profile picture of the author AnitaCross
        Okay, I put the code into my text editor. Then I told it to view without wrapping the lines. Without line-wrap, line 23 is this:

        add_action('thesis_hook_footer', 'rl_footer');

        The first thing I would look for is the definition for add_action, and see what arguments are required. It may be that there should be a third argument in the function call...

        Just guessing here, based on my own limited knowledge of php. But it should only take a couple of minutes to check.

        Hope this helps,
        -Anita
        Signature
        Looking For A Short Cut To Online Retail Profits?
        OSOA on Facebook -- SimplySilk on Facebook

        Anita
        is one of several Moderators at "Live Marketing Chat"
        LMC, mixing work and fun on Saturday nights -- Google it
        {{ DiscussionBoard.errors[3254768].message }}
  • Profile picture of the author donnan
    Did you try changing the double quotes to singles, and I would also remove &copy; just to see if the semicolon is causing a problem.
    {{ DiscussionBoard.errors[3255400].message }}
  • Profile picture of the author Tim Franklin
    To regain access to your admin section, either login to your server via FTP and change the name to thesis_1 of the currently active theme, this should allow you to log back into your admin area, then you can upload a clean copy of the theme, just for curiosity sake did you by chance use the editor to change any code?
    Signature
    Bitcoin | Crypto | Blockchain Secrets |
    {{ DiscussionBoard.errors[3255557].message }}
  • Profile picture of the author e-mail2u
    try putting the semi colon after the 2011 instead of before if all u changed was the year then you prob put it after the colon by mistake.
    {{ DiscussionBoard.errors[3255984].message }}
  • Profile picture of the author xrvel
    I've tried to run your code here, no parse error, everything works fine.
    {{ DiscussionBoard.errors[3256088].message }}

Trending Topics