Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #983408
    primusfit
    Participant

    I created a child theme and pasted the following code into the functions.php folder through wordpress and not I can’t log-in or nothing.

    Parse error: syntax error, unexpected ‘}’ in /home/content/a2pnexwpnas01_data02/32/3281332/html/wp-content/themes/x-child/functions.php on line 31

    How do I fix this?

    function add_search_to_wp_menu ( $items, $args ) {
    if( ‘primary’ === $args -> theme_location ) {
    $items .= ‘<li class=”menu-item menu-item-search”>’;
    $items .= ‘<form method=”get” class=”menu-search-form” action=”‘ . get_bloginfo(‘home’) . ‘/”><p><input class=”text_input” type=”text” value=”Enter Text & Click to Search” name=”s” id=”s” onfocus=”if (this.value == \’Enter Text & Click to Search\’) {this.value = \’\’;}” onblur=”if (this.value == \’\’) {this.value = \’Enter Text & Click to Search\’;}” /><input type=”submit” class=”my-wp-search” id=”searchsubmit” value=”search” /></p></form>’;
    $items .= ‘‘;
    }
    return $items;
    }
    add_filter(‘wp_nav_menu_items’,’add_search_to_wp_menu’,10,2);

    #983605
    Rupok
    Member

    Hi there,

    Thanks for writing in! Let’s login with FTP and remove the code from your file. Make sure the code is correct when you add any custom code.

    Cheers!

    #984702
    primusfit
    Participant

    Thanks, I figured it out after some more research. I just replaced the child function.php file.

    #985282
    Prasant Rai
    Moderator

    You are most welcome. 🙂

  • <script> jQuery(function($){ $("#no-reply-983408 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>