WordPress.org

Ready to get started?Download WordPress

Forums

wp_nav_menu with only upper string func (2 posts)

  1. gavo
    Member
    Posted 4 years ago #

    Hi,

    I would like to create a menu with only capital letters. I watched for the function strtoupper (string $ string) but I could not be used as a filter.

    Maybe this could be part of the next update.

    The function "Use only uppercase letters" for menu items

    Thank you

  2. gabrielrcouto
    Member
    Posted 3 years ago #

    Hey gavo!

    Today I searched a function to do it, and I not found anything. Well, I wrote the function!

    Find a line like the bellow into your header.php file:

    wp_nav_menu( array( 'container_class' => 'nav_menu', 'theme_location' => 'primary') );

    And replace with the code bellow:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Regards,
    Gabriel

Topic Closed

This topic has been closed to new replies.

About this Topic