deving.de

Hello World!
WordPress Plugin: Custom Menu Class

WordPress, ,

WordPress Plugin für voreingestellte CSS Klassen für Menü Links

CSS Klassen für Menü Links zum auswählen

Custom Menu Class ist mein erstes öffentliches WordPress Plugin. Mit diesem Plugin kann man einfach Menu CSS Klassen erstellen. Diese CSS Klassen kann man  anschließend leicht über ein Select-Feld den einzelnen Links des Menüs zuordnen, auch mehrere CSS Klassen gleichzeitig.

Custom Menu Class

Update: 0.2.0

  • Added plugin settings page for CSS classes (Options -> Menu CSS Classes)

Update: 0.2.1

  • Fullwidth select field for menu CSS classes
The following two tabs change content below.
Theodoros
Hello World! Begeisterter Webentwickler & SEO :)
Neueste Artikel von Theodoros (alle ansehen)

Kommentare

  1. Can you provide a real example of how to set the CSS Classes in the file theme/functions.php?

    regards.

    • Hi,

      Copy this code to the end of functions.php

      //theme's functions.php
      add_filter('custom_menu_css_classes', 'custom_menu_classes_extra');
      
      function custom_menu_classes_extra($classes)
      {
          $classes[] = array(
              'name' => __('Footer CSS Class 1', 'custom-menu-class'),
              'class' => 'footer-class-1'
          );
          
          $classes[] = array(
              'name' => __('Footer CSS Class 2', 'custom-menu-class'),
              'class' => 'footer-class-2'
          );
      
          return $classes;
      }
    • I work on a settings page where classes can be added. I release this version in the next days.

  2. Can you tell me how to size the widget by width and align it left, center, right, etc.? I need several menu widgets to appear 3 or 4 across with titles side by side on the page, and also be mobile responsive.

    Thank you.

    • Hm, with this plugin u can set predefined CSS classes for menu items, not for widgets itself.

      • Yes, I understand that you can’t set the widget size, etc. But I need drop-down menus in widgets. Can this plugin be used place menus in widgets?

        (Please forgive me if this is a stupid question … I’m pretty new at all of this)

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

*
*