added code snippet in theme's functions.php file and my site disappeared

Community Forums Forums Design Tips and Tricks added code snippet in theme's functions.php file and my site disappeared

This topic is: resolved

This topic contains 3 replies, has 2 voices, and was last updated by  Dina 9 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #83331

    Dina
    Member
    Post count: 14

    Hi,

    I added this code snippet at the end of the theme’s functions.php file and my site disappeared.

    //* 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’m hoping someone can help me with this. Thank you.

    #83340

    Dina
    Member
    Post count: 14

    I just followed the steps given to someone else that had a similar question and it worked for me (Just lost a few minor changes that I had made).

    I added the same code to another sample site and it worked fine there.

    Why would this happen? I would like to add it again to my site but I’m afraid it might happen again.

    Thanks.

    #83345

    genwrock
    Member
    Post count: 678

    try this

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

    #83394

    Dina
    Member
    Post count: 14

    Thanks Genwrock.

    The code I used is the one from Studiopress’s Snippet page. I copied and pasted it. It seems that the code you are suggesting is the same one, except for the double quotes instead of single quotes.

    Do you know why adding this code to the functions.php file would affect the site this way?

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.