• zyco

    (@zyco)


    Using Coffee2Code’s c2c_get_random_posts I get 1 random post in the sidebar: c2c_get_random_posts(1, “postid=%post_id%<br/>%post_URL%
    %post_excerpt%”, “3”). This shows the id of the post etc.

    However, I would like to include the attached image to the post like so (I think): $img = get_post_meta($id, ‘_wp_attached_file’, 1)

    If a choose %post_content% instead of %post_excerpt%, the image shows up (normal behaviour) but then the post is waaay to long for a sidebar

    Does anybody know of a way to solve this?

  • The topic ‘random sidebar posts including image’ is closed to new replies.