【问题标题】:Elementor custom widget's icon doesn't displayElementor 自定义小部件图标不显示
【发布时间】:2021-11-18 09:55:23
【问题描述】:

现在我要上 Wordpress 课,做老师在 Youtube 课上所做的一切。刚刚在 Elementor 中制作了自定义小部件。但是里面没有图标。

这是 Widget 内部的代码。有什么不明白的?

/**
 * Get widget icon.
 *
 * Retrieve About widget icon.
 *
 * @since 1.0.0
 * @access public
 *
 * @return string Widget icon.
 */
public function get_icon() {
    return 'fa fa-code';
}

【问题讨论】:

    标签: php wordpress widget elementor


    【解决方案1】:

    刚刚发现默认 "fa fa-code" 中的此类在 Elementor 中不起作用。对于 Elementor 仅适用于 "eicon-code" 以下是所有列表:

    Elemetor icons

    例如,此代码将起作用:

    public function get_icon() {
        return 'eicon-code'; 
    }
    

    【讨论】:

    • 如果您已经解决了您的问题,您可以将您的答案标记为已接受。
    • 当然。仅在我回答后 2 天后。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-22
    • 2017-11-06
    • 2013-04-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多