Great question — answering as the UphillTech team:
Sure, we can modify meta tags in WordPress using actions and filters. The <title> tag is pretty easy, WP already has a filter called document_title_parts that allows you to manipulate the title before being outputted to the page. Here's a simplified example of using it : add_filter( 'document_title_parts', 'filter_document_title_parts', 10, 1 ); function filter_document_title_parts( $title_parts ) { // Trims the title to a maximum of 60 characters $max = 60; if ( strlen( $title_parts['title'] ) > $max ) { $title_parts['title'] = substr( $title_parts['title'], 0, $max ) . '...'; } return $title_parts; } The meta description tag can be a bit more complex because WordPress doesn't have a...
Full answer by alex: https://wordpress.stackexchange.com/a/416293 (CC BY-SA 4.0).
Need it done for your business? UphillTech.