• I’m using the random image plugin. But now I want to show random images from the category where one entry is in (I’m using this in single.php).

    <?php randomimage(show_post_title,
                      number_of_images,
                      image_attributes,
                      show_alt_caption,
                      image_src_regex,
                      post_type,
                      inter_post_html,
                      category_filter,
                      sort_images_randomly,
                      image_class_match,
                      image_template_html); ?>

    Now I’m using this:

    <?php randomimage(true, 4, "width='88'", false, "(.gif)", posts, "", "<?php the_category_ID(); ?>", true, "", ""); ?>

    But that won’t do the trick. So, how can I do this?

Viewing 1 replies (of 1 total)
  • Thread Starter davey579

    (@davey579)

    I played around with the php code and it works now:

    <?php $catid = the_category_ID(); randomimage(true, 4, "width='88'", false, "(.gif)", posts, "", "$catid", true, "", ""); ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Random image php question?’ is closed to new replies.