Get first word from WordPress page title

Edit Is this code ok? It works on a dummy website, but I’m afraid to not break a live website. If used for links, is there a problem if links have capitalization? function shortcode_page_title( ){ return get_the_title(); } add_shortcode( 'page_title', 'shortcode_page_title', ); function shortcode_title_first_word( ){ $title = get_the_title(); $title_words = explode(' ', $title); return $title_words[0]; … Read more