Can't work out why getting this 'unexpected T_STRING' error

Discussion in 'PHP' started by Agent000, Oct 29, 2014.

  1. #1
    This is my first attempt at creating a child theme in wordpress. I at a loss to work out this problem
    The error I get is:
    Here is the file:

    <?php
    /**
    *The functions file for the home page
    */

    function dyslexia_scripts() {
    if ( is_front_page() ) {
    wp_enqueue_style( 'dyslexia-styles', get_stylesheet_directory_uri() . '/dyslexia-style.css);

    }

    }

    add_action('wp_enqueue_scripts' , 'dyslexia_scripts');
     
    Solved! View solution.
    Agent000, Oct 29, 2014 IP
  2. thuthuatwordpress

    thuthuatwordpress Active Member

    Messages:
    121
    Likes Received:
    10
    Best Answers:
    1
    Trophy Points:
    75
    #2
    So sorry that this error cannot be fixed because there is a bug when you upgrade to the latest wordpress 4.0
    I have encountered a similar prolem last week, the same issue in my theme as the developer has not updated to match the new wp score function. In this case, you can try to replace the functions.php from your backup theme
    The final solution is changing the theme, if you are unable to login the wp_admin, try to login through the FTP software.
     
    thuthuatwordpress, Oct 29, 2014 IP
  3. #3
    If that's the code, verbatim, you're missing an ' before the last ) on the wp_enqueue_style-entry. And, please learn to use [ code ] brackets (without the spaces) when posting code.
     
    PoPSiCLe, Oct 29, 2014 IP
    Agent000 likes this.
  4. Agent000

    Agent000 Prominent Member

    Messages:
    5,065
    Likes Received:
    842
    Best Answers:
    6
    Trophy Points:
    390
    #4
    Thanks PoPSiCLe - that fixed it. Appreciate the help!
     
    Agent000, Oct 29, 2014 IP