编程语言
首页 > 编程语言> > PHP-使主题wmpl准备好wpml​​-config

PHP-使主题wmpl准备好wpml​​-config

作者:互联网

我正在使用trego主题.作为主题选项,您可以设置和更改将显示在网站中的文本(例如“版权文本”和“徽标网址”的文本).如何使用WPML使这种多语言功能?我想通过wpml-config.xml文件

functions.options.php中的代码示例

        $of_options[] = array(  "name"      => "Header",
                                "type"      => "heading"
        );

        $of_options[] = array(  "name"      => "Logo",
                                "desc"      => "Upload logo here.",
                                "id"        => "site_logo",
                                "std"       => get_template_directory_uri().'/images/logo.png',
                                "type"      => "media"
        );

        $of_options[] = array(  "name"      => "Logo (only Gallery Template)",
                                "desc"      => "Upload logo here.",
                                "id"        => "site_logo2",
                                "std"       => get_template_directory_uri().'/images/logo.png',
                                "type"      => "media"
        );

这是我在wpml-config.xml中的尝试(但不起作用)

    <wpml-config>

        <admin-texts>
            <key name="of_options">
                <key name="site_logo" />
                <key name="site_logo2" />
                <key name="copyright">
                </key>

        </admin-texts>
    </wpml-config>

有什么帮助吗?

解决方法:

这是WPML开发/比较小组的Konrad

标签:multilingual,xml,wordpress,php
来源: https://codeday.me/bug/20191028/1952437.html