I’m creating a list with a few permalinks which I call to with <a href="https://wordpress.stackexchange.com/questions/111931/<?php echo get_permalink($id); ?>" title="...
. And for the title I want to call the_title_attribute()
. But it seems it can only be called within a loop, and not by id. How do I correctly get a title attribute?
Note: The reason I want to use the_title_attributes();
is because I use html tags within some of my titles.