• Im playing around with a little quiz which will have an automatic redirect (using javascript) after a good answer. Is there a way I can get the random url instead of the link to it?

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

    (@extatix)

    Never mind this one, adding ?random after my URL is enough of course. But how can I let it redirect to a custom post type? This does not work:

    function my_random_post_args($args) {
        $args['post_type'] = 'quiz';
    
        return $args;
    }
    add_filter('random_post_args', 'my_random_post_args');

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Random Post Link] Any way to get the random url?’ is closed to new replies.