Support » Plugin: Contact Form 7 » Form doesn’t appear in page only shortcode

  • Helo, i have installed contact form 7 in my wordpress page, i have configurated the form correctly and i have incrusted the shortcode in my contact page but doesn´t appear the form, only the shortcode:

    <?php
    /**
    * Template name: Contacto
    */
    get_header();
    ?>
    <script>
    function initialize() {
    var mapCanvas = document.getElementById(‘map_canvas’);

    var myLatlng = new google.maps.LatLng(40.659742, -3.765408);

    var mapOptions = {
    center: myLatlng,
    zoom: 17,
    mapTypeId: google.maps.MapTypeId.SATELLITE
    }
    var map = new google.maps.Map(mapCanvas, mapOptions);
    // To add the marker to the map, use the ‘map’ property
    var marker = new google.maps.Marker({
    position: myLatlng,
    map: map,
    title:”Hello World!”
    });

    var contentString = ‘<b>Juan Manuel Urrea</b><br><br>Avda. Libertad, 67<br>28770 Comenar Viejo<br>Madrid<br><br>Telf. 626 046 143<br>647 779 619<br>91 920 31 42<br>NIF: E87981205’;
    var infowindow = new google.maps.InfoWindow({
    content: contentString
    });

    google.maps.event.addListener(marker, ‘click’, function() {
    infowindow.open(map,marker);
    });

    }
    google.maps.event.addDomListener(window, ‘load’, initialize);
    </script>
    <div class=”clear”></div>
    <div class=”main-content”>
    <div class=”contact”>
    <div class=”formulario”>
    [contact-form-7 id=”367″ title=”Contact form 1″]
    </ div>
    <div class=”contact-label”>
    <span class=”name”>Juan Manuel Urrea</span>
    <div class=”address”>
    Avda. Libertad, 67<br>
    28770 Comenar Viejo<br>
    (Madrid)
    </div>
    <div class=”telephone”>
    T. 626 046 143<br>
    647 779 619<br>
    91 920 31 42
    </div>
    <div>
    NIF: E87981205
    </div>
    <div class=”text-center”>
    crabpaint18@gmail.com
    </div>
    </div>
    </div>

    <div id=”map_canvas”></div>

    </div>
    </div>

    <?php get_footer() ?>

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hi,

    if you include shortcode directly in template PHP file, you have to pass it through do_shortcode() function – like this:

    <div class="formulario">
    <?php echo do_shortcode('[contact-form-7 id="367" title="Contact form 1"]'); ?>
    </div>
    
Viewing 1 replies (of 1 total)
  • The topic ‘Form doesn’t appear in page only shortcode’ is closed to new replies.