Hi everyone, Please check this : SAMPLE POST I don't know how the coder did this. I can't figure it out. I already put the <?php the_content(); ?> PHP: on the template but nothing happened. This is what you'll see on the post: sample < DESCRIPTION HERE -- that's in the content editor but doesn't show up > Address Phone: Telephone Foot Clinic M-D Opening Hours : 8:00 AM to 7:00 PM, Monday to Friday Please help. The description must show up. Thanks in advance.
hello there, did you put this code after the Loop !? because it's weird.. otherwise your theme use another structure to show the content... Which theme you use!?
It's a 2012 Theme that the previous coder customized. Here's the php file for that post: <?php /** * The Template for displaying all single posts. * * @package WordPress * @subpackage Twenty_Twelve * @[USER=427687]Since[/USER] Twenty Twelve 1.0 */ get_header(); ?> <script src="http://maps.googleapis.com/maps/api/js?sensor=true" type="text/javascript"></script> <script type="text/javascript"> function initialize() { var gestior_style = [{featureType:'water',elementType:'all',stylers:[{hue:'#689dce'},{saturation:-35},{lightness:-17},{visibility:'on'}]},{featureType:'landscape',elementType:'all',stylers:[{hue:'#ecf0f6'},{saturation:12},{lightness:50},{visibility:'on'}]},{featureType:'poi',elementType:'all',stylers:[{hue:'#dfe4ee'},{saturation:-29},{lightness:56},{visibility:'on'}]},{featureType:'road',elementType:'all',stylers:[{hue:'#88b1d7'},{saturation:-70},{lightness:4},{visibility:'on'}]}]; var gestiorMapType = new google.maps.StyledMapType(gestior_style, {name: "<?php _e('<!--:fr-->Clinique du Pied <!--:--><!--:en-->Foot Clinic<!--:-->'); ?>"}); var myLatLng = new google.maps.LatLng(<?php the_field('location'); ?>); var mapOptions = { zoom: 14, center: myLatLng, panControl: false, streetViewControl: true, zoomControl: true, scrollwheel: false, zoomControlOptions: { style: google.maps.ZoomControlStyle.DEFAULT, position: google.maps.ControlPosition.LEFT }, scaleControl: false, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'gestior_style'] } }; var map = new google.maps.Map(document.getElementById('map_single'), mapOptions); //Associate the styled map with the MapTypeId and set it to display. map.mapTypes.set('gestior_style', gestiorMapType); map.setMapTypeId('gestior_style'); var image = '<?php bloginfo( 'template_directory' ); ?>/images/marker.png'; var marker = new google.maps.Marker({ position: myLatLng, map: map, icon: image }); //Options de la fenêtre var myWindowOptions = { content: '<h5 style="font-family:Verdana, Geneva, sans-serif;"><strong> <?php the_title(); ?> </strong></h5>'+ '<p style="font-family:Verdana, Geneva, sans-serif;font-size: 11px;"><?php if(qtrans_getLanguage() == "fr") : the_field('ville_fr'); else: the_field('ville_en'); endif; ?></p>'+ '<p style="font-family:Verdana, Geneva, sans-serif;font-size: 11px;"> <?php the_field('telephone') ?> </p>' }; // Création de la fenêtre var myInfoWindow = new google.maps.InfoWindow(myWindowOptions); // Affichage de la fenêtre au click sur le marker google.maps.event.addListener(marker, 'click', function() { myInfoWindow.open(map,marker); }); } window.onload = initialize; </script> <div id="bandeau"> <div class="wrap"> <div class="image"> <h1><?php the_title(); ?></h1> </div> </div> </div> <div id="maincontent"> <div class="wrap"> <div class="contact-single"> <div class="col1"> <div class="infos"> <h1 style="margin-bottom: 19px;"><?php the_title(); ?></h1> <?php if(qtrans_getLanguage() == "fr") : ?> <p><?php the_field('adresse_fr'); ?></p> <?php else: ?> <p><?php the_field('adresse_en'); ?></p> <?php endif; ?> <p><?php _e('<!--:fr-->Téléphone <!--:--><!--:en-->Phone<!--:-->'); ?>: <br/><?php the_field('telephone'); ?></p> </div> <?php if(qtrans_getLanguage() == "fr") : ?> <div class="opening"> <h2>Clinique du Pied M.D.</h2> <p><strong>Heures d’ouverture :</strong> 8 h à 19 h, du lundi au vendredi </p> </div> <?php else: ?> <div class="opening"> <h2>Foot Clinic M-D</h2> <p><strong>Opening Hours :</strong> 8:00 AM to 7:00 PM, Monday to Friday</p> </div> <?php endif; ?> </div> <div class="col2"> <div id="map_single"></div> </div> <div class="clear"></div> </div> </div> </div> <div class="push"></div> </div> <?php get_footer(); ?> PHP:
can you please past the url because we can't get nothing from this file.. you use google map is it a plugin or just a code you added !?
Hello there, Your link drive to the main website! are you sure it's the right link to get the Sample Page !?
Hello there, so at first view all seem ok, i don't get any error... i don't understand why you see this : < DESCRIPTION HERE -- that's in the content editor but doesn't show up > At all for one, this information have to be here : //Options de la fenêtre var myWindowOptions = { content: '<h5 style="font-family:Verdana, Geneva, sans-serif;"><strong> sample </strong></h5>'+ '<p style="font-family:Verdana, Geneva, sans-serif;font-size: 11px;">Ville</p>'+ '<p style="font-family:Verdana, Geneva, sans-serif;font-size: 11px;"> Telephone </p>' }; Code (markup): So if i understand, what you want to do is adding a Text under the SAMPLE !?
But this what im talking about! This part don't appear anywhere on your Source Code ! where you add this Text !? Because if you need it to appear UNDER Sample so You MUST add it to the Javascript code....
Yes. That's what my problem. I don't know why it doesn't appear even if I put <?php the_content(); ?>