• How can i retrive the content by a relationship in front page, im using Advance Custom Field.

    Site: http://cinema.trancelevel.com/

    Here i retrive fine the field: http://cinema.trancelevel.com/box-office/1-iulie-7-iulie-2012/

    But in front i canot retrive.. anny solutions.?

    <?php
            $id_film_array = get_post_meta(get_the_ID(),"locul_1", true);
            $id_film = $id_film_array[0];
            $titlu_film = get_the_title($id_film);
    
            //$category = get_the_category($id_film);
        ?>
    
        <?php
            $the_query = new WP_Query( array( 'p' => $id_film) );
            while ( $the_query->have_posts() ) : $the_query->the_post();
        ?>
    
        <div class="bi">
    
        <div class="bi-img"><a href="<?php echo get_permalink($id_film); ?>"><img src="/scripts/timthumb.php?src=<?php the_field('img'); ?>&h=55&w=40&zc=1" alt="<?php the_title(); ?>"  title="<?php the_title(); ?>"/></a></div>
        <div class="bi-po">1.<span class="bi-b"><?php $key="incasari_totale_ro"; echo get_post_meta($post->ID, $key, true); ?> <b>RON</b><img class="bi-u" src="/wp-content/themes/movies/images/<?php $key="box_clasament_img"; echo get_post_meta($post->ID, $key, true); ?>" alt="Tip Clasament Box Office" title="Tip Clasament Box Office"/></span></div>
        <div class="bi-linie"></div>
        <div class="bi-ti"><a href="<?php echo get_permalink($id_film); ?>"><?php echo $titlu_film; ?></a></div>
        <div class="bi-tiro"><?php $key="titluro"; echo get_post_meta($post->ID, $key, true); ?></div>
    
        </div>
    
        <?php
          endwhile;
        // Reset Post Data
          wp_reset_postdata();
        ?>

    In front i shoud retrive only first movie ( Total Recal ) – “locul_1”

    Other movies Ex Locul 2 – “locul_2” , Locul 3 – “locul_3″… etc

    http://www.cinema.trancelevel.com/1.JPG

    This code it shoud retrive only 1 movie… Total Recal…

  • The topic ‘How can i retrive the content by a relationship in front page’ is closed to new replies.