The same term_title is displayed on all archive pages
-
I have the problem, that the same title is display on every taxonomy page.
I created an archive page template file, which is responsible for this specific taxonomy.The cpt on this page should be:
https://inn-aktiv.at/angebote/schwimmbaeder/ -> Schwimmb?der – Angebote – Inn-Aktiv
https://inn-aktiv.at/angebote/freizeitangebote/ -> same hereThe YOAST preview shows the correct title:
Schwimmb?der – Angebote – Inn-AktivI tried to replace the %%term_title%% like this:
// define the wpseo_replacements callback function filter_wpseo_replacements( $replacements ) { if( isset( $replacements['%%term_title%%'] ) ){ $replacements['%%term_title%%'] = 'test'; } return $replacements; }; // Add filter add_filter( 'wpseo_replacements', 'filter_wpseo_replacements', 10, 1 );
It looks like the %%term_title%% variable is just not set on the archive page, but the wordpress backend knows how to translate it?
Anyone any ideas? Thanks a lot!
The page I need help with: [log in to see the link]
- The topic ‘The same term_title is displayed on all archive pages’ is closed to new replies.