Can I add a field to the contact form?
It is not possible yet to add a field to the contact form through the admin panel, but it can easily be done with a little coding. Here is a quick guide on how to add you own contact field:
1. Open the file footer.php, and scroll down to the contact form : you can add your field here anywhere within the block . You can copy the markup of the field name, and just change the attributes to match you field name. Just don’t touch the field city, it’s a trap for spam bots.
For instance:
<p class=”required”>
<label for=”my_field”><?php _e(‘My Field’, ‘blue-earth’); ?></label><br />
<input type=”text” name=”my_field” id=”my_field” value=”” class=”input-large” tabindex=”2” />
</p>
You can remove the class required if you don’t want your field to be styled as mandatory.
2. Open the file contact.php, and add these lines:
After line 12:
$my_field = trim($_POST['my_field']);
If your field is mandatory, add it to line 27:
elseif ($name == '' or $mail == '' or $message == '' or $my_field == '')
At line 43, add your field to the replacement string array:
$replace = array(
'[name]' => $name,
'[mail]' => $mail,
'[message]' => $message,
'[my_field]' => $my_field,
'[blog_name]' => get_bloginfo('name')
);
3. Save and upload your files.
You can now use the tag [my_field] (or whatever you named it) in the contact panel of the template admin.
The slideshow does not display, while my portfolio is online and filled with entries. How to fix this ?
Depending on your Wordpress version, some options used to retrieve the slides for the slideshow are not handled correctly.
To fix this, replace line 710 of file admin/lib.php :
'orderby' => blue_earth_get_option('blue_earth_portfolio_orderby'),
By :
'orderby' => str_replace(' ', ',', blue_earth_get_option('blue_earth_portfolio_orderby')),The upload image button does not work when editing portfolio pages
This is due to a minor change in Wordpress 3.0. To fix this, edit file functions.php and replace (line 128):
add_action('admin_print_scripts-page.php', 'blue_earth_page_edit_scripts');
add_action('admin_print_styles-page.php', 'blue_earth_page_edit_css');
By:
if (version_compare('3.0', $GLOBALS['wp_version']) > 0)
{
// Old Wordpress setup
add_action('admin_print_scripts-page.php', 'blue_earth_page_edit_scripts');
add_action('admin_print_styles-page.php', 'blue_earth_page_edit_css');
}
else
{
add_action('admin_print_scripts-post.php', 'blue_earth_page_edit_scripts');
add_action('admin_print_styles-post.php', 'blue_earth_page_edit_css');
}
An update is on the way!


207 Purchases
111 Comments