Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #194329

    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.

    #194516

    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

    #194726

    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

    #194820

    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

    #194851
    This reply has been marked as private.
    #195048

    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

    #195108

    Thank you all,

    It works.

    gr

    Iwan

    #195134

    Hey!

    Glad it worked. :)

    Regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘navigation’ is closed to new replies.