[Solved] It is Possible to remove last words of current post title and echo the result?


Of course, any changes to a theme will reside within a WordPress child theme.

Broadly speaking, this should do it:

 $post_title = get_the_title();
 $post_title_output = explode( " ", $post_title );
 array_splice( $post_title_output, -2 );
 echo implode( " ", $post_title_output );

4

solved It is Possible to remove last words of current post title and echo the result?