max817
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom Post Type UI] Change page/post title to meta value or taxonomyYes! Your plugin is great and your support is awesome. Keep up the good work!
Forum: Plugins
In reply to: [Custom Post Type UI] Change page/post title to meta value or taxonomyYippie, I found a solution!
Wordpress passes the taxonomy directly. I had to make a rewrite and found this page for All in one SEO.
https://www.daddydesign.com/wordpress/how-to-fix-a-custom-post-types-archive-page-title-when-using-the-all-in-one-seo-plugin/
Then i changed the code and now it works. Thank you for your efforts 🙂
`<?php
add_filter( ‘aioseop_title’, ‘dd_rewrite_custom_titles’ );
function dd_rewrite_custom_titles( $title ) {
if ( is_taxonomy(article_id) ) {
$post_type = get_post_type_object( get_post_type() );
$blog_title = get_bloginfo();
$title = get_the_title( $post_id ) . ” | ” . $blog_title;
}
return $title;
}
?>Forum: Plugins
In reply to: [Custom Post Type UI] Change page/post title to meta value or taxonomyHi! Thank you for your fast answer!
“article” is the custom post type and “2019_214” is the taxonomy term which is stored in the taxonomy “article_id”. Every ebook has a taxonomy with that information, so the permalink is created fine.
Oh, I see now that AIOSEO detects the title correctly, but it isnt written in title! Now i have to dig in the seo plugin and replace the title in header with an AIOSEO command, right?
Maybe the taxonomy is detected as taxonomy archive page… and i have to change the header in archive template?
Thank you!