Is there any way to get yoast title inside page using their variable ( i.e. %%title%%)


Staff member
I need to create a function so that I can use that inside any page which is outside the wordpress regular page. I mean wp_head() will not be placed there. I need it for a purpose.

The purpose is for amp( page where I can't use any css or js. That's why I need this. I need to place a function at wp title so that the yoast title be placed there.

I need something like this:

function yoastVariableToTitle($variable){
    return yoast_vaialble_to_show_title($variable);