i try this, but asset_path is not valid
is there some elegant way without using ugly wordpress core functions?
class Single extends Controller
{
/**
* Return next post link
*
* @return string
*/
public static function nextPostLink()
{
$arrow = asset_path('images/arrow.svg');
$img = "<img class='arrow--left' src='$arrow'>";
return next_post_link('%link', $img);
}
}
Btw, I love what you’re doing with Sage, Bedrock and Trellis
Recently found out how easily you can flip logic from views to controller - that’s awesome
Great job guys at Roots!