• Resolved sk_tamilan

    (@sk_tamilan)


    Hi guys i am trying to create slider for my website. where some of my posts have a custom field called “$slideurl” which contains the direct url to the image for the slider.

    what is the best way i can query for posts that have that custom field and display that value ?

    At the moment i have : –

    <?php
    $args = array(
    ‘meta_key’=>’$slideurl’, );

    query_posts($args): if (have_posts()) : while (have_posts()) : the_post();

    //i want to show that meta value for ‘$slideurl’

    endwhile; endif; ?>

    I know i can use this : –

    get_post_meta($post->ID,’$slideurl’ , true);

    But this takes at least 10 seconds to load the images on my webpage.
    what is the best way to go about this? does anyone recommend any alternatives?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Show Meta Value when querying meta key’ is closed to new replies.