Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to add class to ul
#1
Hi
I use this type of navigation:
<?php get_i18n_navigation(return_page_slug(),0, 99,I18N_SHOW_MENU); ?>

I would like to add class="sub-menu" to each UL child menu

    <li>Home</li>
    <li>Services
        <ul class="sub-menu">     //standard is empty <ul>
            <li>Cleaning</li>
        </ul>
    </li>
    <li>Contact</li>


I tried to modify the file \admin\inc\theme_functions.php but I give up!
Any help?
Reply
#2
(2020-02-04, 01:10:04)tomkow Wrote: Hi
I use this type of navigation:
<?php get_i18n_navigation(return_page_slug(),0, 99,I18N_SHOW_MENU); ?>

I would like to add class="sub-menu" to each UL child menu

    <li>Home</li>
    <li>Services
        <ul class="sub-menu">     //standard is empty <ul>
            <li>Cleaning</li>
        </ul>
    </li>
    <li>Contact</li>


I tried to modify the file \admin\inc\theme_functions.php but I give up!
Any help?

Use rendering
PHP Code:
<?php get_i18n_navigation(return_page_slug(),0,99,I18N_SHOW_MENU'name_component'); ?>
Reply
#3
(2020-02-04, 02:05:53)Oleg06 Wrote:
(2020-02-04, 01:10:04)tomkow Wrote: Hi
I use this type of navigation:
<?php get_i18n_navigation(return_page_slug(),0, 99,I18N_SHOW_MENU); ?>

I would like to add class="sub-menu" to each UL child menu

    <li>Home</li>
    <li>Services
        <ul class="sub-menu">     //standard is empty <ul>
            <li>Cleaning</li>
        </ul>
    </li>
    <li>Contact</li>


I tried to modify the file \admin\inc\theme_functions.php but I give up!
Any help?

Use rendering
PHP Code:
<?php get_i18n_navigation(return_page_slug(),0,99,I18N_SHOW_MENU'name_component'); ?>

Ok, but what should I add to component?
Reply
#4
http://mvlcek.bplaced.net/get-simple/mul...-rendering
Reply
#5
(2020-02-04, 02:41:04)Oleg06 Wrote: http://mvlcek.bplaced.net/get-simple/mul...-rendering

It is working!!

I saw the code before but did not know what I should to use it. 
Thank you.
Reply




Users browsing this thread: 1 Guest(s)