• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Help Please

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Help Please

This topic is: not resolved

Tagged: Parse Error, php

  • This topic has 5 replies, 2 voices, and was last updated 10 years, 12 months ago by Brad Dalton.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • October 13, 2015 at 4:07 pm #168076
    conroybp
    Member

    See, this is why I shouldn't try 'things'

    I tried to paste the code to modify the "Read More" link into my functinos php file and totally bunched my site (which SHOULD be at http://www.brianconroy.com, but now isn't!

    I'm getting this message:

    Parse error: syntax error, unexpected $end in /home/content/06/6907906/html/brianconroy/wp-content/themes/sixteen-nine-pro/functions.php on line 173

    This was the code I pasted in:

    <?php
    //* Do NOT include the opening php tag shown above. Copy the code shown below.

    //* Modify the WordPress read more link
    add_filter( 'the_content_more_link', 'sp_read_more_link' );
    function sp_read_more_link() {
    return '[Continue Reading]';
    }

    I didn't post the php tag

    Any thoughts?

    Thanks

    Brian

    http://www.brianconroy.com
    October 13, 2015 at 4:20 pm #168077
    Brad Dalton
    Participant

    Hello Brian

    Link to the source of the code please or embed it correctly.

    As it stands, the code is broken and it will break the site of anyone who copies and pastes it into their theme.


    Tutorials for StudioPress Themes.

    October 13, 2015 at 4:35 pm #168078
    conroybp
    Member

    Hi Brad

    Thanks for stepping in. I'm afraid, I'm not entirely sure what you're asking me:

    The code I pasted in, I took from here - http://my.studiopress.com/snippets/post-excerpts/

    It was this code:

    When I pasted it in, the site crashed, so I deleted it and updated the file, but that did nothing to fix the problem.

    The current functions php is now:

    Does that make things sufficiently clear, or am I still not quite explaining myself correctly?

    Thanks in advance

    October 13, 2015 at 5:47 pm #168079
    Brad Dalton
    Participant

    Hi

    Please copy the code from the view raw link at the bottom of the gist and paste it at the end of your child themes functions file using a code editor. DO NOT use the WordPress theme editor for pasting PHP code.

    Why you got this error http://ccm.net/faq/3377-parse-error-syntax-error-unexpected-end


    Tutorials for StudioPress Themes.

    October 14, 2015 at 2:48 am #168095
    conroybp
    Member

    Brad

    Thanks so much for your help, when I went into the functions php otherwise than through the WordPress Theme Editor, the offending code was still there, once I deleted it, the site came back up straight away.

    Could I possibly abuse your generosity then and ask for some guidance on what could I should insert if I want to add 'read more' to the "Display Post Excerpts" on the "Content Archive" setting.

    On my home page, it shows the 5 latest posts with the featured image and excerpt, and I'd like to add a clickable read more link at the end of the excerpt by default. I've seen posts talking about using the more tag rather than doing it this way, and I'll try that, but if I wanted to do it this way, what would the appropriate code be?

    Thanks again for your help, much obliged

    Brian

    October 14, 2015 at 3:33 am #168097
    Brad Dalton
    Participant

    You'll find multiple examples on my site for this.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble