Forum Replies Created

Viewing 5 replies - 61 through 65 (of 65 total)
  • Thread Starter kasperbs

    (@kasperbs)

    By doing my own research I now understand how to use this.

    I guess it was the if statement that I didn’t really knew how to use. And the (not equal to) also confused me a bit.

    Thread Starter kasperbs

    (@kasperbs)

    Cheers mate, it makes sense. It doesn’t affect anything at all, your code works perfect without it. Thanks you very much again I appreciate you taking the time to help me, quality support you have given me with this issue.

    Thread Starter kasperbs

    (@kasperbs)

    Thanks man!
    It seems to work perfectly, I’m not finished implementing it yet, but unless I comment out the last
    rewind_posts();
    It won’t work.
    Basically if I don’t do it, the single post that is displaying keeps coming over and over again repeating itself forever.

    I have had this problem before when trying to implement code I’ve got from the net. Could you please explain why that happens, and if I need that rewind_posts(); in there at all?

    Thanks

    Thread Starter kasperbs

    (@kasperbs)

    Is
    <img src"<?php bloginfo(url); echo '/wp-content/uploads/'; ?><?php echo $custom_field; ?>" />
    Really the only option in order to do that?

    Thread Starter kasperbs

    (@kasperbs)

    the following piece of code:

    <?php
    $posttags = get_the_tags();
    if ($posttags) {
    foreach($posttags as $tag) {
    echo $tag->name . ' ';
    }
    }
    ?>

    return the tags related to a post, lets say for this example it returned the following: wordpress “racing cars” cereal

    Now i want to gather all posts that have one or more of these tags associated with them. From those posts I want to select two random posts and show them like above with the excerpt and and image from a custom field.

    Hope it clarifies. I know it’s very specific but it’s not uncommon to see related posts shown with an image and a summary. Check the very bottom of this page, that is very similar to what I would like to do:
    https://globalflyfisher.com/patterns/pinkpig/

Viewing 5 replies - 61 through 65 (of 65 total)