Problems With get_bloginfo
-
Hello, fellow WordPressers!
On my site, I am using an Ajax based contact form. Here is a small extract from my contact-page.php page template (I’ve excluded the inputs).
<form method="post" action="<?php echo get_template_directory_uri(); ?>/contact.php" name="contactform" id="contactform"></form>To define the address in which enquiries are sent, you edit the following line in contact.php.
$address = 'email@website.com';When the address is defined like above, the form works perfectly. However, I would like it to automatically update when the site’s main address changes. I am trying the following.
$address = get_bloginfo('admin_email');Unfortunately, this isn’t working. I am getting the following error message.
Fatal error: Call to undefined function get_bloginfo() in /home/beardsqu/public_html/website.com/wp-content/themes/mytheme/contact.php on line 95Does anybody know why it’s not working?
Thanks!
The topic ‘Problems With get_bloginfo’ is closed to new replies.