-
AuthorPosts
-
July 15th, 2018 at 11:27 #66140marknhewittPower User
Using a child theme breaks the primary navigation. all the primary links appear but not the secondary links (drop downs) if I switch the site to the main theme the primary nav menu works as it should.
Website: freelancegeek.marknhewitt.co.uk
- This topic was modified 6 years ago by marknhewitt. Reason: wrong website
July 15th, 2018 at 11:31 #66141marknhewittPower UserChild style.css
/* Theme Name: Septera Child Theme Template: septera Version: 1.0.3.1 */
Child functions.php
<?php function my_theme_enqueue_styles() { $parent_style = 'parent-style'; wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ) ); } add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
Just in case you ask 🙂
- This reply was modified 6 years ago by marknhewitt.
- This reply was modified 6 years ago by marknhewitt.
July 15th, 2018 at 11:51 #66145marknhewittPower UserI think it may be to do with the website being in a subdomain, seems to work fine is on a normal domain 🙁
If I download to version 1.2.4 the menu works fine again
- This reply was modified 6 years ago by marknhewitt. Reason: additional info
July 22nd, 2018 at 18:12 #66449ZedCryout Creations mastermindSeptera needs its styles to load in a certain order.
Try the code below for the child theme enqueues:
function septera_child_styling(){ wp_enqueue_style( 'septera-main', get_template_directory_uri() . '/style.css', array(), _CRYOUT_THEME_VERSION ); // restore correct parent stylesheet wp_enqueue_style( 'septera-child', get_stylesheet_directory_uri() . '/style.css', array( 'septera-main' ), '0.1' ); // enqueue child stylesheet } add_action( 'wp_enqueue_scripts', 'septera_child_styling' );
Try not to change the style ids as they are used for other enqueues as well.
If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic. -
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
The topic ‘Child Theme Primary Nav’ is closed to new replies.