Hello Thomas,
Thanks for reminding me of this issue. I had marked the topic you mentioned as resolved and totally forgot to investigate. Sorry about that.
I’m working on the 2.5.1 release which will be out soon and it will include a fix/workaround for this issue.
Could you post the PHP code that generates the title in your theme? Usually found in header.php like:
<title><?php wp_title( '|', true, 'right' ); ?></title>
Note: WP 4.1 has added a new feature regarding the generation of post titles through add_theme_support( 'title-tag' ).
Thanks in advance,
George
Also, do you use the %title% placeholder in the custom title of the post?
This might cause some trouble in some cases. I am considering removing this functionality.
The proposed fix possibly resolves an issue that is not caused by the plugin, but by the PHP code that is used to print the <title> tag (usually in header.php):
$custom_title = str_replace('%title%', $title, $custom_title);
to
$custom_title = str_replace('%title%', $title, $custom_title).' | ';
If the proposed fix above goes into the plugin, then in many themes the custom title would appear having a pipe | as the last character.
The only resolution would be to add a filter and append the | character as needed in your theme’s functions.php without having to edit the source code of the plugin.
Fixed in 2.5.1. Added filter ‘amt_custom_title’.
To append a pipe ‘|’ to the custom title, the following code should be placed in the functions.php file of your theme:
function amt_custom_title_modified( $title ) {
return $title . ' | ';
}
add_filter( 'amt_custom_title', 'amt_custom_title_modified', 10, 1 );
This code also exists as the ‘Example 9’ in the plugin description page.
I’m marking this topic as resolved. If the problem still persists, please let me know, so I can help with additional sample code.
Kind Regards,
George
Hi George,
having updated to 2.5.1 of your plugin and also having edited the functions.php of my (child) theme like you described in post #5 above, everything works fine for my twenty eleven theme, still on WP 4.0.1.
Will update to WP 4.1 in the next few days / the next week, assuming that everything will still be ok then 🙂
Thanks a lot 🙂
Thomas
Hi Thomas, glad to hear it works fine!