I've created a function to generate "buttons" on the site, but the following doesn't appear to work:
<?php $thetitle=the_title(); ?> <?php echo button($type,$link,$icon,$thetitle); ?>
When I do this, the title for the button ends up blank. If I manually insert text, the text appears (so I know the function works)
How do I pass WP variables like the_title(), the_permalink(), the_date() etcetera?
Hope you can help!