It looks like the WCFM My Shop page needs to be a woocommerce page type to be able to use those styles? I came to that conclusion because if i go to Woocommerce settings and set the WCFM page as the “My Account” page then the menu works fine, but i want to keep My Account and shop management seperate.
]]>Please take a look at
https://va.in-design.com
Do you see that green menu on top. I am trying to figure a way to create a wordpress theme and add that menu to the top.
Tonight, I am going to try and add it to the child theme’s pages. Hard coded; however, is there a better way to do that? Other than just hard code it into the theme’s code?
I am new to wordpress; but have extensive knowledge and lots of coding skills. So, I am not faint of heart.
It just seems to me that there should be an easy way to add different menu styles. Perhaps by adding CSS styles and the javascripts / code to a theme in a more clean way.
Thanks,
Tamer
Yes! I am working with a child theme.
I have styled the submenu but have not done something correctly.
When I hover over a main menu link – the submenu opens.
When I click a submenu link – it goes to the proper page.
When I hover over the main menu and the submenu open – ALL the submenu links appear to have the css of the visited link – even though I did not visit all those page – just one of them.
The site is under development here:
https://prestigedentalcarestl.com/testing/
If you go to Services and click Dental Implants and then hover back over the Services main menu link. You will see what I mean.
Don’t know how to fix this.
Any help is appreciated!
]]>In earlier releases of WP (2.9.2 and earlier) I did something like this, where the categories are 2nd level and given their own style:
<div id="topnav">
<ul id="menu_top">
<li><a href="<?php echo get_option('home'); ?>/">Home</a></li>
<li><a href="#">Categories</a>
<ul class="subnav">
<?php wp_list_categories('orderby=name&title_li=');
$this_category = get_category($cat);
if (get_category_children($this_category->cat_ID) != "")
?>
</ul>
</li>
<?php wp_list_pages('exclude=14,20&title_li='); ?>
</ul>
</div>
In 3.0 I’ve used the theme that the above example is from as my testing theme, if you will. Therefore, in functions.php I added:
add_action( 'init', 'register_my_menus' );
register_nav_menus( array(
'top-menu' => __( 'Top Menu', 'top_nav' ),
'side-menu' => __( 'Sidebar Menu', 'side_nav' ),
'footer-menu' => __( 'Footer Menu', 'bottom_nav' )
) );
I then added the menu items I wanted for each menu using the menu editor found in the Appearance module, changed ul id to ul class for the top level menu in the style sheet and in the header.php file, and added <?php wp_nav_menu( array( 'menu_class' => 'menu_top','theme_location' => 'top-menu' ) ); ?>
to the header.php file.
Here’s what the code looks like now:
<div id="topnav">
<?php wp_nav_menu( array( 'menu_class' => 'menu_top','theme_location' => 'top-menu' ) ); ?>
</div>
When previewing the theme with the new and improved(?) menu, the top level menu displays fine for the most part, but the 2nd level is horizontal and always visible and is styled exactly like the top level… it shouldn’t be, but I can’t find the solution to apply a style to the 2nd level menu.
Any advice/help would be great!
]]>