-1

I am using a theme called "Venture" and created a child theme to edit the styling via CSS, however I am running into a bit of an issue. The navigation our client wants to use is available on top as part of the theme, as the main nav, but the footer menu/nav is a different styling altogether and seems to be wrapped by a PHP function or a widget, I can't really tell.

I want to to make it look like the one on top. However, no matter what I do in CSS it won't change, and I find that by adding more CSS code which is essentially already in the parent theme is redundant and unnecessary, since I can use them if coded correctly. How to solve this issue?

The site I am building is on a sub-domain on WP.

4

1 回答 1

0

好的,所以我想出了一个很好的方法来做到这一点。基本上我创建了一个footer.php 文件并将其添加到我的子主题文件夹中。我从父“footer.php”文件复制代码并粘贴到子版本。然后我删除了菜单的内容,它在它里面曾经指向二级菜单,现在它指向主菜单。然后我通过 CSS 样式跟进它。我将 menu 重命名为 menu_2,如下所示:

              <div class="menu_2">
        <?php if (has_nav_menu( 'primary' )) {
            wp_nav_menu( array(
                'container' => 'menu',
                'container_class' => '',
                'menu_class' => 'dropdown',
                'menu_id' => 'mainmenu',
                'sort_column' => 'menu_order',
                'theme_location' => 'primary'
                ));
        } else {
            echo '<p>Please set your Main navigation menu on the <strong><a href="'.get_admin_url().'nav-menus.php">Appearance > Menus</a></strong> page.</p>';
        } ?>
    </div>
于 2013-08-22T23:16:06.770 回答