In recent releases of Add-Meta-Tags the add_filter()
function that attaches the amt_custom_title_tag()
filtering function to the wp_title
filter hook has been set to send a second argument to the filtering function; the separator that is used between the various parts of the title.
There are two possible causes of this error:
1. The wp_title
filter in the used WordPress version does not send the second argument.
Possible solutions:
a. I revert back to the one-argument version of the filtering function. BTW, the $separator
variable is not used anyway.
b. You upgrade WP, which might be a problem in some cases.
2. The amt_custom_title_tag()
function is called from a custom add_filter()
statement somewhere in your theme’s functions.php
(perhaps in order to change the priority) in a way that the second argument is not passed to the filtering function.
Possible solution: fix the custom add_filter()
statement. The correct way to attach the amt_custom_title_tag()
filtering function to the wp_title
filter hook is the following:
add_filter('wp_title', 'amt_custom_title_tag', 1000, 2);
The last argument (number 2) is important.
If you need more help, post a question on the Github issue tracker (find the link on the description page) as I generally have stopped providing support on this forum.
Kind Regards,
George