解决 Avada 主题不使用子主题的 css 的问题,需要修改 functions.php

解决 Avada 主题不使用子主题的 css 的问题,需要修改 functions.php


标签: 

正在查看 3 个帖子:1-3 (共 3 个帖子)
  • 作者
    帖子
  • 诗语
    管理员
    • 文章数量: 5,866
    @feibisi
    楼主

    Avada 主题很好用,但是从4.0 版本开始就遇到了这个问题,将 css 添加到自定义子主题中后,网站却不使用子主题的 css ,今天找了下发现问题是出在子主题的 functions.php,需要修改下这个文件。

    替换下面的代码:

    function theme_enqueue_styles() {
    wp_enqueue_style( 'avada-parent-stylesheet', get_template_directory_uri() . '/style.css' );
    }

    像这样 :

    function theme_enqueue_styles() {
    wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'avada-stylesheet' ) );
    }

    先记录下来。

    薇晓朵
    管理员
    • 文章数量: 478
    @weixiaoduo

    请客户到商城下载最新版主题,产品已更新:

    首页

    85210stef
    • 文章数量: 1
    @85210stef

    测试一下

正在查看 3 个帖子:1-3 (共 3 个帖子)
  • 话题「解决 Avada 主题不使用子主题的 css 的问题,需要修改 functions.php」已关闭,不接受新回复。

未找到对应子版块?请直接在 [疑难杂症] 版块中发帖提问。

收藏纪念品


有奖活动

参与论坛社区问答,有机会获赠文派瓦普(Wapuu.com)手办模型。

产品博客


RSS 错误: http://blog.weixiaoduo.com/feed is invalid XML, likely due to invalid characters. XML error: Invalid document end at line 2, column 1

话题信息

商业系统