Si estás usando la plantilla generatepress, aquí tienes el código para añadir un texto al comienzo o /y final del título del post.
add_filter( 'generate_get_the_title_parameters', 'filter_custom_post_title' ); function filter_custom_post_title( $params ) { if ( is_single() ){ $prefix = 'My prefix '; $suffix = ' My suffix'; } if ( $prefix || $suffix ) { $params = array( 'before' => sprintf( '<h1 class="entry-title"%1$s>%2$s ', 'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : '', $prefix ), 'after' => sprintf( '%1$s</h1>', $suffix ), ); } return $params; }
Al contrario que generate_after_entry_title y generate_before_entry_title, que añaden después o/y antes del título, el código comentado lo hace en la misma línea.