Tagged: x
-
AuthorPosts
-
May 9, 2016 at 9:12 pm #983408
primusfitParticipantI 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);May 10, 2016 at 1:36 am #983605
RupokMemberHi 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!
May 10, 2016 at 3:16 pm #984702
primusfitParticipantThanks, I figured it out after some more research. I just replaced the child function.php file.
May 10, 2016 at 11:13 pm #985282
Prasant RaiModeratorYou are most welcome. 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-983408 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
