Woocommerce – Making product pages child of shop

You don’t need to force the permalink structure to do this. These effects are usually handled by adding some class (with a specific style) to the item you want to highlight, in this case the <li> containing the link to the shop.

In your site, the Shop menu entry (when in the Shop page) is:

    <li id="menu-item-23" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item current_page_item menu-item-23">
<a href="http://md4s1307.keaweb.dk/shop/">Shop</a>
</li>

Both li.current-menu-item > a and li.current_page_item > a are styled in your theme with the special color. You just need to add either of these classes to the li element in the single product pages, which you can do with:

jQuery(document).ready(function(e) {e('#menu-item-23').addClass("current-menu-item");...}

For a quick fix, you could simply modify your script single-product.js (which presumably loads just for single product pages) to include this snippet within its “document ready”. Obviously all warnings about modifying code that you later may want to update (i.e. your theme) apply, but that’s for a different question.

You could also attempt to be more general and locate the menu item whose text content is “Shop”, etc.

tech