Support » Plugin: Post type archive in menu » CSS classes not assigned correctly

  • Resolved istarnet


    First, this plugin works great, as far as it goes. It is the only off-the-shelf plugin that worked for me. The problem is: I cannot use the Appearance – Menus interface to add a custom class to the menu items.

    Suppose I have a CPT called ‘my_cpt’ and I’ve added it to the menu. When I visit the Appearance – Menus page and twist open the menu, the value in the text box for custom class says: post-type-archive-my_cpt. This would be excellent but…

    When I view source or inspect the

    <li> element for the menu item, the class assigned is an ‘item-‘ class derived from a seemingly random post within the custom post type. So then, I want to change that so I head back over to Appearance – Menu. If I enter an unique custom class name and save the menu, that custom class is *not* added to the </li>
    <li>. The unique custom class name remains in the box for the custom class for the item but the random ‘item-…’ class remains assigned to the </li>
    I believe that the plugin is totally usable as is. It seems that the CSS classes assigned to the menu items are permanent. It just that the cool WordPress feature where you can assign your own custom classes is not working.

    After my project completes, I’ll try to take a look at the code and post a fix if I find one. Until then, if the developer releases a new version that handles classes correctly, I’d be very happy indeed.

    Best, Regards…

Viewing 2 replies - 1 through 2 (of 2 total)
  • I am quite confused at this point. I still cannot assign custom classes but I don’t know why. I’ve deactivated this and other plugins but the problem remains. I think my database might be corrupted. More if is get a clue.

    Falsely accused! The plugin is perfect. My theme is overwriting classes on menu items. I have no idea why but the theme has a low priority filter that totally replaces classes on menu items. I had written a high priority filter to work around the problem but my workaround was being overwritten. I highly recommend this plugin. It solves my needs perfectly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘CSS classes not assigned correctly’ is closed to new replies.