Site icon Hip-Hop Website Design and Development

How to add first 3-4 post tags on WordPress Post Title

Is there any theme function code that put the first 3-4 post tags on WordPress Post Title. Let’s assume I am creating a new article for my site and I added the below tags for my post

My Post Title – Wishing You a Very Happy Birthday

My Post tags – Balloon, Birthday, Wishes, Gift, Celebration, Party

I want to put the first 4 tags to my post title whenever I publish or save draft the post. My title should be like:

Wishing You a Very Happy Birthday - Balloon, Birthday, Wishes, Gift

I also want to add a custom text Greeting at the end of the post title.