简体   繁体   中英

Wordpress 2014 child theme setup

i am having trouble activating a child theme for a wordpress 2014 theme. I created a folder twentyfourteen-child. I have a style.css with

1 /*  
2 Theme Name:Twenty Fourteen Child
3 Version: 1.0
4 Theme URI: link
5 Description: A basic starter child theme for Twenty Fourteen 
6 Author: Tim 
7 Author URI: link
8 Template: twentyfourteen
9 License: GPL 
10 License URI: ...
11 */

And a functions.php with

 1<?php
 2 add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
 3 function enqueue_parent_styles() {
 4         wp_enqueue_style( 'parent-style',  get_template_directory_uri().'/style.css');
 5 }

I am running another wordpress site with the same theme and the same code, which is working fine. The two websites are both installed in subdirectories and the Template name from the style.css is matching the directory name of the parent theme. I basically just copied these two files.

When i activate the child theme the menu structure is destroyed. The side contains a menu on the left side and the top side, but now they are both merged in the top menu. Has someone an idea what could be wrong here!?

如果您已经设置了主题并在此之后激活了子主题,则必须重新分配菜单的真实外观 - >菜单。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM