Shortcode to show current page title
function title_func($atts) { extract( shortcode_atts( array( 'num_words' => 20, ), $atts ) ); //$title = get_the_title(get_the_ID()); $title = substr(get_the_title(), 0, $num_words ); $length = strlen(get_the_title()); if ($length > $num_words) { $more = "…"; } else { $more = ""; }…