There is a Yoast Seo plugin that allows you to add %% currentyear %% and %% currentmonth %% variables to your pages title, as well as add your variables via functions.php
The task is to print the month and year into a title (and the month will be a constant value, and the year is variable) according to the following logic: For example, the title: "Rest in Bulgaria in May% the variable of the year%" this year, then we derive the next year. If not passed or still goes, we derive the current year.
How to implement it correctly in functions.php
I would be very grateful for the help.