Echo Tag: What am I missing

Hi,

I feel like either the echo tag doesn’t work at all or I’m missing something basic.

I have a site I’ve been running for 14 years that publishes short stories. The titles are listed “Title by Author” for SEO (originally). I’m rebuilding the site in Bricks and have it working with a code element. But I’d rather use the echo tag in a heading element. That way I can reuse the titles semantically.

My simple code:

function custom_title($post_title = null){

if(empty($post_title)) return "Fail";
list($title,$author) = explode(" by ",$post_title);
return $title;

}

And the echo tag: {echo:custom_title(‘{post_title}’)}

I’ve tried variations with single and double quotes. I’ve tried echo and return in the code. I’ve tried returning it with static text. I get blank. I’ve tried it with the header, rich text, and basic text. nada. Also tried with no arguments.

So, what obvious thing am i missing?

-Ron

Hi @Ron ,

Did you whitelist custom_title via this hook?