Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #7012

    Hello everyone! i’ve a problem with my Display 3 in 1 theme… i’m creating my new site, and i have to add a contact form.. so i’ve added and traduced it.. this is the code:

    <?php

    /*

    Template Name: Contact Form

    */

    global $k_option;

    $name_of_your_site = get_option(‘blogname’);

    $email_adress_reciever = $k_option;

    $error = true;

    if(isset($_POST))

    {

    include(‘send.php’);

    }

    $k_option = “”; // $k_option = “class=’fullwidth'”;

    get_header();

    ?>

    <div id=”main”>

    <div id=”content”>

    <?php if (have_posts()) : while (have_posts()) : the_post(); // start loop

    $more = 0;

    // check if we got a previe picture, and which one should be taken

    // (image resizing with “tim thumb” on? then we can take the big one and resize it)

    $preview_small = get_post_meta($post->ID, “_preview_small”, true);

    $preview_medium = get_post_meta($post->ID, “_preview_medium”, true);

    $preview_big = get_post_meta($post->ID, “_preview_big”, true);

    //defaults:

    $preview = $preview_medium;

    $link_url = $preview_big;

    $lightbox = ‘singlepost';

    $link = true;

    //change if necessary:

    // resizing? => take next sized picture

    if ($k_option == “1” && $preview_medium == “”)

    {

    $preview = $preview_big;

    }

    // no bigpicture? => no lightbox

    if ($preview_big == “”) { $lightbox = ”; $link = true; $link_url = get_permalink(); }

    // the kriesi_build_image function used here checks if the image should be resized.

    // the function is located in framework/helper_functions

    $preview = kriesi_build_image(array(‘url’=>$preview,

    ‘height’=> ‘273’,

    ‘width’=> ‘610’,

    ‘lightbox’=>$lightbox,

    ‘link’=>$link,

    ‘link_url’=>$link_url

    ));

    ?>

    <div class=’entry’>

    <h2>” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”><?php the_title(); ?></h2>

    <?php

    echo $preview;

    the_content(); ?>

    <form action=”” method=”post” class=”ajax_form”>

    <fieldset><?php if (!isset($error) || $error == true){ ?><h3><span>Inviaci un messaggio</span></h3>

    <p class=”<?php if (isset($the_nameclass)) echo $the_nameclass; ?>” ><input name=”yourname” class=”text_input empty” type=”text” id=”name” size=”20″ value='<?php if (isset($the_name)) echo $the_name?>’/><label for=”name”>Nome e Cognome*</label>

    </p>

    <p class=”<?php if (isset($the_emailclass)) echo $the_emailclass; ?>” ><input name=”email” class=”text_input email” type=”text” id=”email” size=”20″ value='<?php if (isset($the_email)) echo $the_email ?>’ /><label for=”email”>E-Mail*</label></p>

    <p><input name=”website” class=”text_input” type=”text” id=”website” size=”20″ value=”<?php if (isset($the_website)) echo $the_website?>”/><label for=”website”>Sito Web</label></p>

    <label for=”message” class=”blocklabel”>Messaggio*</label>

    <p class=”<?php if (isset($the_messageclass)) echo $the_messageclass; ?>”><textarea name=”message” class=”text_area empty” cols=”40″ rows=”7″ id=”message” ><?php if (isset($the_message)) echo $the_message ?></textarea></p>

    <label for=”avviso” class=”blocklabel”>* Campi obbligatori</label>

    <p>

    <input type=”hidden” id=”myemail” name=”myemail” value=”<?php echo $email_adress_reciever; ?>” />

    <input type=”hidden” id=”myblogname” name=”myblogname” value=”<?php echo $name_of_your_site; ?>” />

    <input name=”Send” type=”submit” value=”Invia” class=”button” id=”send” size=”16″/></p>

    <?php } else { ?>

    <p><h3>Il tuo messaggio è stato spedito!</h3> Grazie!</p>

    <?php } ?>

    </fieldset>

    </form>

    </div>

    <?php

    endwhile;

    endif;

    ?>

    </div>

    <?php get_sidebar(); ?>

    <!–[if IE 6]><div style=”clear: both”></div><![endif]–>

    </div>

    <?php get_footer(); ?>

    As you can see i’ve changed only the language from English to Italian.. now i have 2 problems.

    1 – When i send an email from this form (just for try) the Successful message is in English (but i’ve traduced it to Italian)

    2 – Email are not sender to the address that i’ve specificated on the Display Option Menu (and in nothing other account)…. so mail are not sender….

    Can someone help me please???

    Scuse me for my bad grammar.. i’m italian and i’m not speak english very well. Thank You!

    #56253

    * email are not sent… scuse me but this is the OS X Lion auto correction…

    #56254

    I’ve solved it using Contact Form 7 but if someone know the solution of this problem please reply

    #56255

    Hi,

    a common problem using contact forms is that the host doesn’t allow the mail() function many themes use. You can contact your host and ask them about this.

    #56256

    thanks a lot!!!

    #56257

    Glad that Chris could help you :)

    #56258

    Need Help

    I just noticed my contact form is not working. It used to work fine. Could it be because i upgraded to the new version of wordpress. The website is http://www.latileworks.com/.

    Thanks

    #56259

    pushingtile,

    you’re running an older version of Display. You can download the newest version from ThemeForest for free. The contact issue was solved for WP3+ in the newer versions.

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Contact form still not working’ is closed to new replies.