Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i18N - menu range limited
#1
Hi all,
Is possible to set the limit of display items in menu using this tag:

<?php get_i18n_navigation(return_page_slug(),0, 99,I18N_SHOW_MENU); ?>

For example:
I have 5 sub pages
menu1 | menu2 | menu3 | menu4 | menu5

but I want to see on website just 4 sub pages
menu1 | menu2 | menu3 | menu4

Method with 'Page Visibility' is excluded.

Thanks
Reply
#2
maybe you can use class {display:none} for this on css style? All menu item in i18n have class like slug. Maybe can help for yours problem.like example

item1 item2 item3 item4

.item4{ display:none;}
Reply
#3
(2019-06-14, 06:43:48)multicolor Wrote: maybe you can use class {display:none} for this on css style? All menu item in i18n have class like slug. Maybe can help for yours problem.like example

item1 item2 item3 item4

.item4{ display:none;}

This is a nearest solution, thanks
Reply
#4
Here's the solution, but I didn't check
PHP Code:
$menu_data return_i18n_menu_data(return_page_slug(),099,I18N_SHOW_MENU)
$output array_slice($menu_data03); // return menu1, menu2, menu3
var_dump($output);

foreach (
$output as $item){
пример!
echo
'<li><a href=".$item[url]." title=".$item[title].">.$item[xxx].</a></li>'
...

Reply




Users browsing this thread: 1 Guest(s)