I'm currently working on configuring MarketPress for

I'm currently working on configuring MarketPress for http://zcs.zyniker.org/ and I've run into a minor issue with the navigation which MarketPress adds for the children of its primary page. As you can see, the MarketPress navigation elements aren't displaying properly. This seems to be a fairly simple CSS issue, but I'm not sure where to make the change in marketplace.php.

It looks like two changes will be necessary. As the other navigation elements look like this: <li class="dropdown " data-dropdown="dropdown"> and the MarketPress one looks like this: <li>, it seems to be an issue of attributes on the <li>. However, editing this alone doesn't resolve the issue, because there is one other difference between the MarketPress navigation elements and the others. That difference is in the class on the children of the primary page; MarketPress's primary page's children have the following code <ul class="children"> while the other navigation elements' children have this code: <ul class="dropdown-menu">.

Looking through marketpress.php, I found the following line $nav .= '<ul class="children"><li class="page_item'. ((get_query_var('pagename') == 'product_list') ? ' current_page_item' : '') . '"><a href="' . mp_products_link(false, true) . '" title="' . __('Products', 'mp') . '">' . __('Products', 'mp') . '</a></li>';. Changing the class here seems to solve the second of the issues I mentioned, supra, but not the first.

Any ideas of what I should change to resolve the first issue?

  • Alexander

    Hi @Zyniker,

    Have you added a nav menu in your appearance settings? I believe that right now it is setup to dynamically generate a menu via wp_list_pages.

    The code you modified is actually setup to accomodate wp_list_pages in the case that a nav menu isn't being used. This is mainly for older themes that don't support the new menus, or for when you don't define a menu.

    If you're in the same place in marketpress.php, scroll to the next function and you will see that it can also add the menu items via wp_nav_menu. This is a much better option because the markup is handled by Wordpress instead of the plugin - removing any inconsistencies.

    So I'd recommend just adding a nav menu. If this isn't possible, let me know and we can look at other options. Hopefully this helps!

    Thanks for being a WPMU DEV member. Let us know if we can be of any further assistance.
    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.