WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Passing variables?! Halp!

[Resolved] Passing variables?! Halp!

  • 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!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Passing variables?! Halp!’ is closed to new replies.
Skip to toolbar