Infelizmente, sou designer… E tenho uma noção superficial de programação.
Colei o código:
————————————
//Define the key to store in the database
define( ‘CF7_COUNTER’, ‘cf7-counter’ );
//Create the shortcode which will set the value for the DTX field
function cf7dtx_counter(){
$val = get_option( CF7_COUNTER, 0) + 1; //Increment the current count
return $val;
}
add_shortcode(‘CF7_counter’, ‘cf7dtx_counter’);
//Action performed when the mail is actually sent by CF7
function cf7dtx_increment_mail_counter(){
$val = get_option( CF7_COUNTER, 0) + 1; //Increment the current count
update_option(CF7_COUNTER, $val); //Update the settings with the new count
}
add_action(‘wpcf7_mail_sent’, ‘cf7dtx_increment_mail_counter’);
————————————
Dentro do pluguim:
contact-form-7/includes/functions.php
E nada aconteceu…..
E os Shortcodes.. também não funcionaram, veja como o formulário é impresso em meu site:
http://krolfernandes.ppg.br/teste/
Obrigada pela ajuda!
E como eu escrevo esse código em php?
Estou querendo colar ele dentro de meu formulário PHP do WordPress. Mais especificamente dentro do Contact Form 7.
Tiofelix , Muito obrigada. Sua explicação era exatamente o que eu precisava!