Nickolai-Geek
@Nickolai-Geek

Как выводить логотип с помощью Unyson framework?

С добрым утром,

Уже неделю пытаюсь освоить Unyson framework - как заменить цвет, фавикон и другие мелочи я разобрался, а вот вывести логотип на место текстового логотипа у меня не получается. Фреймворк интересный, вот я и подумал что кто-то научился это делать?

Судя по документации manual.unyson.io/en/latest/options/built-in-option... нужно в settings.php прописать этот код:

array(
    'type'  => 'multi-upload',
    'value' => array(
        /*
        array(
            'attachment_id' => '9',
            'url' => '//site.com/wp-content/uploads/2014/02/whatever.jpg'
        ),
        ...
        */
        // if value is set in code, it is not considered and not used
        // because there is no sense to set hardcode attachment_id
    ),
    'attr'  => array( 'class' => 'custom-class', 'data-foo' => 'bar' ),
    'label' => __('Label', '{domain}'),
    'desc'  => __('Description', '{domain}'),
    'help'  => __('Help tip', '{domain}'),
    /**
     * If set to `true`, the option will allow to upload only images, and display a thumb of the selected one.
     * If set to `false`, the option will allow to upload any file from the media library.
     */
    'images_only' => true,
    /**
     * An array with allowed files extensions what will filter the media library and the upload files.
     */
    'files_ext' => array( 'doc', 'pdf', 'zip' ),
    /**
     * An array with extra mime types that is not in the default array with mime types from the javascript Plupload library.
     * The format is: array( '<mime-type>, <ext1> <ext2> <ext2>' ).
     * For example: you set rar format to filter, but the filter ignore it , than you must set
     * the array with the next structure array( '.rar, rar' ) and it will solve the problem.
     */
    'extra_mime_types' => array( 'audio/x-aiff, aif aiff' )
)


а что прописать в header.php ?

Пытался по аналогии с framework Redux написать код, который тут описан Как сделать замену логотипа используя Redux Framework? , но знаний не хватает чтобы это осуществить для Unyson.
  • Вопрос задан
  • 711 просмотров
Пригласить эксперта
Ответы на вопрос 2
@moldcraft
wp_get_attachment_url($value['attachment_id']);
Ответ написан
artur_kudaev
@artur_kudaev
Frontend Developer
В header.php приписываю
<a href="<?php bloginfo("template_directory"); ?>"><?php the_custom_logo(); ?></a>

и в этих настройках устанавливаю логотип (не знаю как называется этот инструмент, поэтому скинул картинкой, думаю найдешь )
5a70f37195afc422825144.png
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы