• 12-01-2013, 16:10:54
    #1
    Merhabalar;

    Aşağıdaki kodda echo içindeki kısım düz metin olduğu zaman sorun yaşanmıyor ama bu şekilde içinde php kodu olduğunda kod çalışmıyor. Kodun doğru yazımı nasıl olmalı? Php bilen arkadaşlar yardımcı olursa sevinirim.

    <?php 
    if(is_single())
    $code = get_post_meta($post->ID,'mvb_vid_code', true);
    $video_source = get_post_meta($post->ID,'videosource', true);
    $pos = strpos($video_source,'dailymotion.com');
    
    if ($pos === false) { 
        echo "<?php the_content('<p class="serif">Tamam??Oku &raquo;</p>'); ?>"; 
    } else { 
        echo "<?php echo get_post_meta($post->ID, "embed", true); ?>"; 
    } 
    
    ?>
  • 12-01-2013, 16:14:38
    #2
    <?php
    if(is_single())
    $code = get_post_meta($post->ID,'mvb_vid_code', true);
    $video_source = get_post_meta($post->ID,'videosource', true);
    $pos = strpos($video_source,'dailymotion.com');

    if ($pos === false) {
    echo the_content('<p class="serif">Tamam??Oku &raquo;</p>');
    } else {
    echo get_post_meta($post->ID, "embed", true);
    }

    ?>
  • 12-01-2013, 16:23:03
    #3
    Çok teşekkür ederim.