Content not showing up - Custom Post Types and Custom Fields used

Discussion in 'WordPress' started by ivounnerry, Nov 4, 2013.

  1. #1
    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.
     
    ivounnerry, Nov 4, 2013 IP
  2. themes4all

    themes4all Well-Known Member

    Messages:
    662
    Likes Received:
    47
    Best Answers:
    6
    Trophy Points:
    100
    #2
    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!?
     
    themes4all, Nov 4, 2013 IP
  3. ivounnerry

    ivounnerry Member

    Messages:
    252
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #3
    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:
     
    ivounnerry, Nov 4, 2013 IP
  4. themes4all

    themes4all Well-Known Member

    Messages:
    662
    Likes Received:
    47
    Best Answers:
    6
    Trophy Points:
    100
    #4
    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 !?
     
    themes4all, Nov 4, 2013 IP
  5. ivounnerry

    ivounnerry Member

    Messages:
    252
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #5
    I didn't notice the link is removed. Here's the link:
    http://www.cliniquedupied-md.com/sample/
     
    ivounnerry, Nov 5, 2013 IP
  6. themes4all

    themes4all Well-Known Member

    Messages:
    662
    Likes Received:
    47
    Best Answers:
    6
    Trophy Points:
    100
    #6
    Hello there,

    Your link drive to the main website! are you sure it's the right link to get the Sample Page !?
     
    themes4all, Nov 5, 2013 IP
  7. ivounnerry

    ivounnerry Member

    Messages:
    252
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #7
    My mistake.
    Here's the correct one:
    http://www.cliniquedupied-md.com/fr/cliniques/sample
     
    ivounnerry, Nov 5, 2013 IP
  8. themes4all

    themes4all Well-Known Member

    Messages:
    662
    Likes Received:
    47
    Best Answers:
    6
    Trophy Points:
    100
    #8
    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 !?
     
    themes4all, Nov 5, 2013 IP
  9. ivounnerry

    ivounnerry Member

    Messages:
    252
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #9
    I mean this part

    < DESCRIPTION HERE -- that's in the content editor but doesn't show up >

    must show.
     
    ivounnerry, Nov 5, 2013 IP
  10. themes4all

    themes4all Well-Known Member

    Messages:
    662
    Likes Received:
    47
    Best Answers:
    6
    Trophy Points:
    100
    #10
    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....
     
    themes4all, Nov 5, 2013 IP
  11. ivounnerry

    ivounnerry Member

    Messages:
    252
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #11
    Yes. That's what my problem. I don't know why it doesn't appear even if I put
    <?php the_content(); ?>
     
    ivounnerry, Nov 5, 2013 IP
  12. ivounnerry

    ivounnerry Member

    Messages:
    252
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #12
    what code should I add to show the content from the content editor?
     
    ivounnerry, Nov 5, 2013 IP
  13. ivounnerry

    ivounnerry Member

    Messages:
    252
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #13
    I fixed it already. :)
     
    ivounnerry, Nov 6, 2013 IP
  14. themes4all

    themes4all Well-Known Member

    Messages:
    662
    Likes Received:
    47
    Best Answers:
    6
    Trophy Points:
    100
    #14
    glad to hear that so you can explain how you did like that others can find a solution over here :)
     
    themes4all, Nov 6, 2013 IP