0

我有一个带有 Enfold-child 主题的 WP 网站。对于标题,我选择将公司徽标放在左上角,将主菜单放在公司徽标下方。我想在公司徽标的右侧添加一张图片,但我不尝试这样做。header.php 的最后一部分如下

<?php 
    if(!$blank) //blank templates dont display header nor footer
    { 
         //fetch the template file that holds the main menu, located in includes/helper-menu-main.php
         get_template_part( 'includes/helper', 'main-menu' );

    } ?>

    <div id='main' class='all_colors' data-scroll-offset='<?php echo avia_header_setting('header_scroll_offset'); ?>'>

    <?php 

        if(isset($avia_config['temp_logo_container'])) echo $avia_config['temp_logo_container'];
        do_action('ava_after_main_container'); 

    ?>

我是否必须修改此文件以添加图像?你能帮我吗?谢谢!

4

2 回答 2

1

如果您不想触摸 header.php,您可以考虑使用 css ::after 选择器

于 2017-03-03T21:29:57.647 回答
1

尝试这个。这是来自 Enfold 的知识库文章,详细介绍了如何将 Widget 区域添加到标题以添加自定义代码,即图像。

这正是我们用来做这件事的。

http ://www.kriesi.at/documentation/enfold/adding-a-widget-area-to-the-header/

于 2017-02-02T15:07:36.483 回答