- Envato Staff
- Reviewer
- Community Moderator
- Venezuela
- Has been a member for 4-5 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Microlancer Beta Tester
- Sold between 10 000 and 50 000 dollars
- Exclusive Author
Hey guys I’m trying to achieve this with my WordPress admin panel, I know this is silly 
https://gist.github.com/bad96f6e26c60ee37255
I tried echo, I tried single and doble quotes and I don’t know what the hell is going on.
Any php guru around here?
- Author had a Free File of the Month
- Author was Featured
- Bought between 10 and 49 items
- Egypt
- Exclusive Author
- Has been a member for 2-3 years
- Item was Featured
- Referred between 10 and 49 users
- Sold between 10 000 and 50 000 dollars
I dont really see anything wrong with your code but first of all make sure you added the ivor_contact_email option using update_option or add_option functions by WordPress and the below should definitely work
$email = get_option('ivor_contact_email');
define( "WEBMASTER_EMAIL", $email );
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Item was Featured
- Author had a Free File of the Month
- Author was Featured
- Bought between 10 and 49 items
- Europe
- Exclusive Author
- Has been a member for 4-5 years
- Referred between 100 and 199 users
the $email in the define must be in ” “
- Author had a Free File of the Month
- Author was Featured
- Bought between 10 and 49 items
- Egypt
- Exclusive Author
- Has been a member for 2-3 years
- Item was Featured
- Referred between 10 and 49 users
- Sold between 10 000 and 50 000 dollars
the $email in the define must be in ” ”
I dont think that its necessary to have it in double quotes
the $email in the define must be in ” ”I dont think that its necessary to have it in double quotes
definitely right.
Ivor, you just need to remove the double quotes from the email variable..
$email = get_option('ivor_contact_email');
define( "WEBMASTER_EMAIL", $email );
- Envato Staff
- Reviewer
- Community Moderator
- Venezuela
- Has been a member for 4-5 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Microlancer Beta Tester
- Sold between 10 000 and 50 000 dollars
- Exclusive Author
I tried with single quotes, doble quotes and without quotes, maybe it have something to do with update_option as wisylabs said.
- Envato Staff
- Reviewer
- Community Moderator
- Venezuela
- Has been a member for 4-5 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Microlancer Beta Tester
- Sold between 10 000 and 50 000 dollars
- Exclusive Author
This is the whole file guys – https://gist.github.com/88559af15e45cfa33b5d contact-form.php
- Author had a Free File of the Month
- Author was Featured
- Bought between 10 and 49 items
- Egypt
- Exclusive Author
- Has been a member for 2-3 years
- Item was Featured
- Referred between 10 and 49 users
- Sold between 10 000 and 50 000 dollars
Ivor, is there anywhere in your theme the option ivor_contact_email is inserted into the database? like somewhere in your theme options that adds the ivor_contact_email option on the form submit ?
using update_option('ivor_contact_email', 'example@example.com'); or add_option('ivor_contact_email', 'example@example.com');
Is this for getting the WordPress admin email?
- Envato Staff
- Reviewer
- Community Moderator
- Venezuela
- Has been a member for 4-5 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Microlancer Beta Tester
- Sold between 10 000 and 50 000 dollars
- Exclusive Author
Ivor, is there anywhere in your theme the option ivor_contact_email is inserted into the database? like somewhere in your theme options that adds the ivor_contact_email option on the form submit ? usingI’m adding the email via the admin panelupdate_option('ivor_contact_email', 'example@example.com');oradd_option('ivor_contact_email', 'example@example.com');
$options[] = array( "name" => "Contact Email",
"desc" => "Enter your email for the contact page (i.e. example[at]email.com)",
"id" => $shortname."_contact_email",
"std" => "",
"type" => "text");
