title: How to show random post type and category wordpress
body: <p>I have a piece of code to show a random post type of specific category, it show  one post but it does now show random, I wish to show a random post every single time the user refresh this page, any advice and suggestions will be greatly ppreciated. </p>
  
  <p>Thansk :)</p>
  
  <pre><code>    &lt;?php
  
  global $post;
  $args = array(
      'post_type'=&gt;'topics',
      'showposts'=&gt;'1',
      'cat'=&gt; 8,
      'orderby' =&gt; 'rand'
  );
  
  $query = 'orderby=rand';
  $my_query = new WP_Query($args);?&gt;
  &lt;?php 
  while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post();?&gt;
      &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;
  
  &lt;?php endwhile; 
  wp_reset_query(); ?&gt;
  </code></pre>