Ich bin schon ein bisschen weiter gekommen. Habe es nun schon geschafft, dass der Kategoriename ausgegeben wird im Titel. Nun brauche ich aber noch Hilfe, ob es möglich ist dies nur für bestimmte Kategorien zu machen.
Erweiterung functions.php:
[FONT=Courier New]add_action( 'custom_product_name_title', 'custom_product_category_title', 6 );
function custom_product_category_title(){
global $post;
$terms = get_the_terms( $post->ID, 'product_cat' );
$title = ''; foreach ($terms as $term) {
$title = $term->name .' ';
}
echo "<span>".$title."</span>";
}[/FONT]
title.php:
[FONT=Courier New]<h1 class="product_title entry-title">
<?php do_action( 'custom_product_name_title' ); ?>
<?php echo esc_html( get_the_title() ); ?> </h1>[/FONT]