• Resolved leighross

    (@leighross)


    I added some code to my functions.php file and got this error:
    Parse error: syntax error, unexpected ‘<‘ in /home/leighross/public_html/wp/wp-content/themes/handdrawn-lite/functions.php on line 122

    I had a look but couldn’t find that ‘<‘ so I removed the code I put in but the error is still showing.
    How can I repair this please?

    I was adding some code to register and display the footer widget.

    This is the code from line 109 – 135

    function handdrawn_the_custom_logo() {
        if ( function_exists( 'the_custom_logo' ) ) {
            the_custom_logo();
        }
    }
    endif;
    
    /*
     * Adds editor style 
     *
     */
    
    function handdrawn_add_editor_styles() {
        $font_url = str_replace( ',', '%2C', '//fonts.googleapis.com/css?family=Source+Sans+Pro:300,700,300italic' );
        add_editor_style( $font_url );
        add_editor_style( 'handdrawn-editor-style.css' );
    }
    add_action( 'admin_init', 'handdrawn_add_editor_styles' );
    
    /**
     * Function to avoid page scroll clicking on "Read More"
     */
    if ( ! function_exists( 'handdrawn_remove_more_link_scroll' ) ) {
        function handdrawn_remove_more_link_scroll( $link ) {
            $link = preg_replace( '|#more-[0-9]+|', '', $link );
Viewing 7 replies - 1 through 7 (of 7 total)
  • It’s hard to see what the issue is, you can return your functions.php file to its default state by re-uploading the file using FTP or your hosts File Manager software.

    When making changes, you really should be doing so via the use of a Child Theme, it is much safer and easier.

    Thread Starter leighross

    (@leighross)

    Thanks,

    I have done that and it seems nothing I do will make any changes. Each time I try to o anywhere on the site it gives me the same error. I have re-uploaded and overwritten that file twice with no luck. Not sure why it wouldn’t be acknowledging the changes I have made?

    Have you cleared your application’s cache or browser history? You can also look for a file in your wp- content folder called object-cache.php or advanced-cache.php and rename or delete it to make sure you are seeing the latest changes on your site.

    Thread Starter leighross

    (@leighross)

    Yes I have cleared the cache on the browser. I can’t access my site at all to make any changes

    Are you sure you’re editing the right file in the right directory?

    Make a copy and then delete the file – if there issues persists – guaranteed the wrong file…

    Thread Starter leighross

    (@leighross)

    OK found the correct file – Thanks.

    that’s great..thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Error’ is closed to new replies.