子主题不会覆盖父CSS

时间:2016-04-12 21:44:51

标签: php css wordpress wordpress-theming

我的WP Organics主题的子主题不是覆盖父CSS。我发现一些消息来源说以不同的方式实现父CSS,但我在标题中找不到CSS链接。

主题安装在WP中,完全与父主题一样。

<?php

// Theme init - don't remove next row! Load custom options
organics_core_init_theme();
$theme_skin = organics_esc(organics_get_custom_option('theme_skin'));
$body_scheme = organics_get_custom_option('body_scheme');
if (empty($body_scheme)  || organics_is_inherit_option($body_scheme)) $body_scheme = 'original';
$blog_style = organics_get_custom_option(is_singular() && !organics_get_global('blog_streampage') ? 'single_style' : 'blog_style');
$body_style  = organics_get_custom_option('body_style');
$article_style = organics_get_custom_option('article_style');
$top_panel_style = organics_get_custom_option('top_panel_style');
$top_panel_position = organics_get_custom_option('top_panel_position');
$top_panel_scheme = organics_get_custom_option('top_panel_scheme');
?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="<?php echo esc_attr('scheme_'.$body_scheme); ?>">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1<?php echo (organics_get_theme_option('responsive_layouts') == 'yes' ? ', maximum-scale=1' : ''); ?>">
<meta name="format-detection" content="telephone=no">

<?php
if (floatval(get_bloginfo('version')) < 4.1) {
    ?><title><?php wp_title( '|', true, 'right' ); ?></title><?php
}
?>

<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />

<?php
if ( !function_exists('has_site_icon') || !has_site_icon() ) {
    $favicon = organics_get_custom_option('favicon');
    if (!$favicon) {
        if ( file_exists(organics_get_file_dir('skins/'.($theme_skin).'/images/favicon.ico')) )
            $favicon = organics_get_file_url('skins/'.($theme_skin).'/images/favicon.ico');
        if ( !$favicon && file_exists(organics_get_file_dir('favicon.ico')) )
            $favicon = organics_get_file_url('favicon.ico');
    }
    if ($favicon) {
        ?><link rel="icon" type="image/x-icon" href="<?php echo esc_url($favicon); ?>" /><?php
    }
}

wp_head();
?>
</head>

0 个答案:

没有答案