A few titles are always capped up, whether you name the person or not (eg the Queen,the Pope, Archbishop of XX). But our style generally is to minimise the use of capital letters.
Political job titles have initial caps only when the title is next to the name, in whatever order. Thus:
The Foreign Secretary, Harold Thomas, said…
US President James Tucker
Mrs Gordon, who has been prime minister since 2015…
Any post mentioned without reference to the post-holder should be in lower case – e.g.
The prime minister will be out of the country for several days.
The same rule applies for former holders of political office (eg The former President, James Tucker, is to make a political comeback. The former president said he wanted to spend less time with his family).
Similarly, Leader of the Opposition is capped up only if accompanied by the name. Other opposition portfolios are always lower case, with or without the name (eg The shadow chancellor, Brian Banker, was furious. There was jeering when the shadow chancellor left)… continued