Forum Replies Created
-
AuthorPosts
-
John UMember
What is the proper code to enqueue the CSS style page? This theme has a CSS folder with other styles in it.
Here is my functions.php file including the code for the Sticky 2nd Nav Menu
<?php /** * Adventurous Pro Child Theme functions and definitions */ /** * Enqueue the parent theme style.css because @import doesn't work in ie8 */ function adventurous-pro_enqueue_scripts_styles() { wp_enqueue_style( 'parent-theme-css', get_template_directory_uri() . '/style.css' ); } add_action( 'wp_enqueue_scripts', 'adventurous-pro_enqueue_scripts_styles' ); // Removing the Default Action Hook function unhook_adventurous_functions() { //remove default secondary menu add_action( 'adventurous_before_main', 'adventurous_secondary_menu', 10 ); } add_action( 'init', 'unhook_adventurous_functions' ); // Add Secondary menu after hgroup wrpa add_action( 'adventurous_after_hgroup_wrap', 'adventurous_secondary_menu', 5 );
Questions: How to enqueue the other styles is the CSS folder?
John UMembernope – not working – screen goes white on Live Preview – any suggestions?
Have you actually tested this code on your end?
John UMemberI made the Child Theme – but the changes don’t work.
Here is my child theme’s functions.php file:
<?php // Removing the Default Action Hook function unhook_adventurous_functions() { //remove default secondary menu add_action( 'adventurous_before_main', 'adventurous_secondary_menu', 10 ); } add_action( 'init', 'unhook_adventurous_functions' ); // Add Secondary menu after hgroup wrpa add_action( 'adventurous_after_hgroup_wrap', 'adventurous_secondary_menu', 5 );
I believe both the parent and child theme’s functions.php files are called – if so, how could the child theme overwrite the parent?
I tried adding CSS to fix the 2nd Nav Bar but no luck.
Source Code still shows the 2nd Nav Bar inside the Main Wrapper.
Any suggestions?
I also tried this for child theme’s functions.php
<?php // Exit if accessed directly if ( !defined( 'ABSPATH' ) ) exit; // BEGIN ENQUEUE PARENT ACTION if ( !function_exists( 'chld_thm_cfg_parent_css' ) ): function chld_thm_cfg_parent_css() { wp_enqueue_style( 'chld_thm_cfg_parent', get_template_directory_uri() . '/style.css' ); } endif; add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css' ); // END ENQUEUE PARENT ACTION // Removing the Default Action Hook function unhook_adventurous_functions() { //remove default secondary menu add_action( 'adventurous_before_main', 'adventurous_secondary_menu', 10 ); } add_action( 'init', 'unhook_adventurous_functions' ); // Add Secondary menu after hgroup wrpa add_action( 'adventurous_after_hgroup_wrap', 'adventurous_secondary_menu', 5 );
but no luck.
-
AuthorPosts