Pleas can you tell me how to change the following
In my navigation menu i have a few menu-items like this
Print/Scan Oplossing
and i want to change that in
Print/Scan
Oplossing
In the pagetitle i thougt that the solution was : Print/Scan<br> Oplossing
But that was not right. I need to change the css but where and how.
Can you help?
greatings
Iwan.
Hi Iwan!
I’ve found this code, add this to the function.php file (at the end)
function wpa_105883_menu_title_markup( $title, $id ){
if ( is_nav_menu_item ( $id ) ){
$title = preg_replace( '/#BR#/', '<br/>', $title );
}
return $title;
}
add_filter( 'the_title', 'wpa_105883_menu_title_markup', 10, 2 );
Then when setting the Menu title, simply put it like this:
Cheers!
Josue
Hello Josue,
When i ad this code
*********
function wpa_105883_menu_title_markup( $title, $id ){
if ( is_nav_menu_item ( $id ) ){
$title = preg_replace( ‘/#BR#/’, ‘<br/>’, $title );
}
return $title;
}
add_filter( ‘the_title’, ‘wpa_105883_menu_title_markup’, 10, 2 );
************
everything freezes and wordpress does not work anymore.
I put the code in the theme (Enfold) functions is that right?
Greetings
Iwan
Hey!
I tested locally and it worked, can you create an administrator account and post it here as a private reply so i can try it out?
Best regards,
Josue
Hey!
You can do something like this. Edit the menu item then change the “Navigation Label” to something like this:
Print/Scan <span class="menu-second-line">Oplossing</span>
Add this on your custom.css or Quick CSS:
.menu-second-line {
clear: both;
display: block;
position: relative;
top: -70px;
}
Cheers!
Ismael
Thank you all,
It works.
gr
Iwan