Newspaper headlines by their very nature are designed to grab as much attention as possible, in the least possible space, and as such, almost have a grammar of their own.
One example of this is the use of the infinitive form of the verb to refer to future events - e.g.
Parliament to decide new policy tomorrow.
Germany to take in 5000 more refugees.
President to visit France for further talks.
Using the infinitive in this manner, a future time is not always necessary to demonstrate the future tense in headlines.
In your example:
The president to agree with the opinion.
...simply means that the president will agree with this opinion, sometime in the future.
On a related note, I'm presuming your example is one you made up for the purposes of the question, as it doesn't seem to be as concise as one would expect form a headline. President to agree with reforms or similar would be more realistic.