Archived topic
Navigation bar height can't be resized if child them is used
1 reply · Started by devme on March 5, 2023
Viewing posts 1–2 of 2
I tried to use Child theme. If i use sticky menu unnecessary top/bottom padding is added and it can't be reduced. Everything is fine if i use the parent theme. Am I missing anything?
style.css:
/*
Theme Name: My Custom Theme
Author: MyCustom
Author URI: https://example.com
Template: generatepress
Version: 0.1.1
Description: Custom Theme
*/
function.php:
<?php
function my_assets() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
add_action( 'wp_enqueue_scripts', 'my_assets' );
Hi there,
remove:
<?php
function my_assets() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
add_action( 'wp_enqueue_scripts', 'my_assets' );
from your functions.php - its not required as GP handles loading the parent styles that automatically.
This archived topic is closed to new replies.