I’ve found a few tutorials on adding substr() to variables but not to functions. The output in html so far is:
<div class="symbol"><?php the_title();?></h3>
Inside the_title() when I hover over it the following function in Eclipse it displays:
function = the_title($before = '', $after = '', $echo = true){
$title = get_the_title();
if (strlen($title) == 0 )
return
$title = $before . $title . $after
if ($echo)
echo $title;
else
...
I’m just unsure whether I need to add to the function in the backend pages or I can code it in the front end.
You can use the function
get_the_title()in wordpress to get the current title returned as a string:You don’t have to store the title in a variable, you can just go straight to: