• Hello !!

    I would like to display paginated meta value content.
    I have a few videos per post, registered as meta values for meta key “video”. And would like them to be paginated instead of being all displayed at once. I have tried a few js scripts but they fail in displaying different iframe videos correctly (inconsistent display between different sources such as dailymotion,, vimeo, youtube).

    Therefore, each meta value video should be paginated automatically according to the available meta values for such key per post…

    Could anyone please help find a solution, using php?
    This has prevented me from pursuing my project for a while now 🙁

    thank you so much 😉

    Code for displaying meta value inside the loop:

    <?php $video = get_post_meta($post->ID, 'video', true);
    if ($video) {?>
    <?php echo $video; ?>
    <?php } else { ?>
    <?php } ?>
    
    <?php $video2 = get_post_meta($post->ID, 'video2', true);
    if ($video2) {?>
    <?php echo $video2; ?>
    <?php } else { ?>
    <?php } ?>
Viewing 1 replies (of 1 total)
  • Thread Starter campbelson

    (@campbelson)

    Or let’s start with this:
    How to write a loop calling all custom values from all custom fields bearing the key name video(n) (video1, video2, video3 etc..) and how to display them according to that order ?

    while ($video != NULL)
    {
    echo $video.$n;
    $n++
    }
Viewing 1 replies (of 1 total)

The topic ‘Paginated Meta Value Content’ is closed to new replies.