Community Forums › Forums › Archived Forums › General Discussion › Updating my Sample Theme
Tagged: updating sample theme
- This topic has 1 reply, 2 voices, and was last updated 7 years, 11 months ago by Christoph.
-
AuthorPosts
-
May 18, 2016 at 11:44 am #185853emaddaouMember
Hi everyone,
I need your help please, everything worked fine after updating my Sample theme except the following codes, they missed up my website design 🙁 so I disabled them. Are these codes critical to have or should I just keep them disabled? Sorry but I am new genesis and wordpress.
//* Enqueue Scripts and Styles
//add_action( 'wp_enqueue_scripts', 'genesis_sample_enqueue_scripts_styles' );
//function genesis_sample_enqueue_scripts_styles() {
//
// wp_enqueue_style( 'genesis-sample-fonts', '//fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700', array(), CHILD_THEME_VERSION );
// wp_enqueue_style( 'dashicons' );
//
// wp_enqueue_script( 'genesis-sample-responsive-menu', get_stylesheet_directory_uri() . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0', true );
// $output = array(
// 'mainMenu' => __( 'Menu', 'genesis-sample' ),
// 'subMenu' => __( 'Menu', 'genesis-sample' ),
// );
// wp_localize_script( 'genesis-sample-responsive-menu', 'genesisSampleL10n', $output );
//
//}//* Add Accessibility support
//add_theme_support( 'genesis-accessibility', array( '404-page', 'drop-down-menu', 'headings', 'rems', 'search-form', 'skip-links' ) );Please let me know when you get a chance. Thanks 🙂
Imad
May 19, 2016 at 10:37 am #185903ChristophMemberHi Imad,
this part loads Javascript and stylesheet files. You probably don't want to completely comment it out.
//* Enqueue Scripts and Styles //add_action( 'wp_enqueue_scripts', 'genesis_sample_enqueue_scripts_styles' ); //function genesis_sample_enqueue_scripts_styles() {
This part changes the font to the new Source Sans Pro.
You might want to add the old font or change it to the old font Lato:300,400,700
(e.g. change it to Source+Sans+Pro:300,400,600,700|Lato')// // wp_enqueue_style( 'genesis-sample-fonts', '//fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700', array(), CHILD_THEME_VERSION );
If you are using or planning to use dashicons on the front end, you will need this. If not you can keep it commented out.
// wp_enqueue_style( 'dashicons' );
This part includes the new responsive menu.
// wp_enqueue_script( 'genesis-sample-responsive-menu', get_stylesheet_directory_uri() . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0', true ); // $output = array( // 'mainMenu' => __( 'Menu', 'genesis-sample' ), // 'subMenu' => __( 'Menu', 'genesis-sample' ), // ); // wp_localize_script( 'genesis-sample-responsive-menu', 'genesisSampleL10n', $output ); // //}
If you used a tutorial to create a responsive menu, this might cause conflicts.
If not, you should be able to un-comment this part.Adding accessibility support will definitely change how your website is displayed.
//* Add Accessibility support //add_theme_support( 'genesis-accessibility', array( '404-page', 'drop-down-menu', 'headings', 'rems', 'search-form', 'skip-links' ) );
If you are going to un-comment part of this code, make sure it's wrapped like this:
//* Enqueue Scripts and Styles add_action( 'wp_enqueue_scripts', 'genesis_sample_enqueue_scripts_styles' ); function genesis_sample_enqueue_scripts_styles() { Code you decide to use }
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.