Categories
Coding WordPress

Modify page title tag in WordPress

To change page title tag in WordPress, use the pre_get_document_title filter.

Most of the answers on web have mentioned the filter wp_title, but do not use it as wp_title function will be deprecated in future and wp_title hook will not work.

At present, wp_title filter does not work when modifying the title tag.

By Abhineet Mittal

Abhineet is IIM Alumnus and Founder of popular Digital Publishing Platform, Sahityapedia. He is a technology enthusiast by hobby & an avid reader.