Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Martin Stehle

    (@hinjiriyo)

    Try that code. Please append it in the functions.php of the theme:

    // Passed parameter: an array of social media icons as list items
    function kalawebs_add_flags_in_bar ( $list_items ) {
    
        // Add flag list as last item in the list, via $array[]
        // The content has to be surrounded by the LI element
        $list_items[] = '<li>^' . cml_show_flags( array( 'echo' => false ) ) . '</li>';
    
        // Returns changed list
        return $list_items;
    
    }
    
    // Let the function work
    add_filter( 'speed_contact_bar_icons', 'kalawebs_add_flags_in_bar' );

    That will print out a UL list with the flags. If you want to style the UL you can use CSS.

    Thread Starter kalawebs

    (@kalawebs)

    Thanks! Worked like a champ!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding a function as a new item’ is closed to new replies.