Forum Replies Created
-
AuthorPosts
-
sellingonlinetodayMember
Hi again,
This doesn't seem to work, I've pasted the code into the functions, don't think it's meant to be!sellingonlinetodayMemberAgh i cant seem to get it working correctly, can you assist me? Can you remove what needs to be removed so it can work showing the search bar? I tried again but simply got another error on a different line. >>
add_filter( 'wp_nav_menu_items', 'theme_menu_extras', 10, 2 );
/**
* Filter menu items, appending either a search form or today's date.
*
* @param string $menu HTML string of list items.
* @param stdClass $args Menu arguments.
*
* @return string Amended HTML string of list items.
*/
function theme_menu_extras( $menu, $args ) {//* Change 'primary' to 'secondary' to add extras to the secondary navigation menu
if ( 'primary' !== $args->theme_location )
return $menu;//* Uncomment this block to add a search form to the navigation menu
/*
ob_start();
get_search_form();
$search = ob_get_clean();
$menu .= '<li class="right search">' . $search . '';
*///* Uncomment this block to add the date to the navigation menu
/*
$menu .= '<li class="right date">' . date_i18n( get_option( 'date_format' ) ) . '';
*/return $menu;
}sellingonlinetodayMemberI saw you mentioned 're-upload' so i went to my cpanel and downloaded the functions file and saw the 'new' code was still in it, so i re-uploaded the working code and all works now.
sellingonlinetodayMemberYes, correct, i have re-saved the code after removing the 'new' code. I also had a copy in a notepad file, copy and pasted that and it still comes up an error aswell
sellingonlinetodayMemberHi,
I removed the code that i had previously entered as i thought that was the error, its supposed to be like it was before i put in the code.<?php
//* Start the engine
include_once( get_template_directory() . '/lib/init.php' );//* Child theme (do not remove)
define( 'CHILD_THEME_NAME', 'Genesis Sample Theme' );
define( 'CHILD_THEME_URL', 'http://www.studiopress.com/' );
define( 'CHILD_THEME_VERSION', '2.1.2' );//* Enqueue Google Fonts
add_action( 'wp_enqueue_scripts', 'genesis_sample_google_fonts' );
function genesis_sample_google_fonts() {wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:300,400,700', array(), CHILD_THEME_VERSION );
}
//* Add HTML5 markup structure
add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) );//* Add viewport meta tag for mobile browsers
add_theme_support( 'genesis-responsive-viewport' );//* Add support for custom background
add_theme_support( 'custom-background' );//* Add support for 3-column footer widgets
add_theme_support( 'genesis-footer-widgets', 3 );sellingonlinetodayMemberHi,
Thanks for the reply, although i didn't copy in the php code that was instructed to be left out.This is the last bit of code in the box >
"
//* Add support for 3-column footer widgets
add_theme_support( 'genesis-footer-widgets', 3 );"
Am i missing something from the end?
sellingonlinetodayMemberHi Pixel,
I had added in this code and it has completely messed up my site, it now doesnt display and comes up with the error >>> "Parse error: syntax error, unexpected end of file in /home/sellingonline123/public_html/wp-content/themes/genesis-sample/functions.php on line 68"I removed the code and the same error came up again. Check out the error here http://www.sellingonlinetoday.com/category/podcast-interviews/
Thanks
sellingonlinetodayMemberHi, this has been fixed by myself. Not sure on how to edit or deleted this post as i have another query
-
AuthorPosts