Support » Fixing WordPress » Single.php Line 11

  • Hello! I am having trouble with a code in my wordpress, single.php page. My website is:

    When clicking on certain links with plugins (facebook share/nrelate/add a comment, etc.) the link goes to a blank page with the following code showing:
    Parse error: syntax error, unexpected ‘<‘ in /home/content/96/8886796/html/wp-content/themes/picture-perfect/single.php on line 11

    My line 11 code on single.php is:
    <p><?php the_content(‘<p class=”serif”>Read the rest of this entry ยป</p>’);</p>

    When I remove this code all together and refresh, the link tries to find the post but comes back with just the title/author, etc. and no post content.

    Can someone please help me with what the code should be to get all these links working properly. I’ve been scratching my head for a few weeks now and have not gotten anywhere. Thanks in advance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Michael


    Forum Moderator

    the error is likely to be caused by some code before that line 11 – please paste the full code of single.php into a and post the link to it here.

    Does this work? Thanks for the reply. Hopefully we can work together to get this working. Let me know if you need anything else.

    You have not closed the php on line 11

    <p><?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>');</p>

    It should read

    <p><?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>');?></p>

    Oh my gosh thank you.
    The related link works great, I hope you dont mind if I ask you another question…
    The AddThis facebook share and (maybe the other ones aren’t working now).
    Could you offer me suggestions?
    Also the author name and date for post is not showing up underneath the title on the index page but it is working on actual post page and doubling the author name, like:
    Written by: Erin Erinon February 16, 2012.

    Again any help is appreciated.
    Thank you!

    You could try this as many of your php’s do not end with a ; before the ?>

    Try checking over the author name etc and put in ; ?> at the end of the php codes.

    Thanks for the advice! I will continue to look into the author problem I am having. It seems to be posting on the related page on the top and bottom, again doubling my name but not on the main page and not on all posts.
    I am very new to this so its a bit confusing.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Single.php Line 11’ is closed to new replies.