WordPress.org

Support

Support » Plugins and Hacks » [plugin: random_post_link] Trying to get it to only show post from same cat.

[plugin: random_post_link] Trying to get it to only show post from same cat.

  • hi i been looking everywhere i cant find anything on this. I found code to make it use a one category.
    this goes in the functions.php

    function my_random_post_args($args) {
    
    $args['category_name'] = 'cat-slug-here';
    
    return $args;
    }
    add_filter('random_post_args', 'my_random_post_args');

    it works like a charm for one cat. but i want it to work for all my cats

    link to plugin
    http://wordpress.org/support/plugin/random-post-link

    [ Please do not bump, it’s not permitted here. ]

  • The topic ‘[plugin: random_post_link] Trying to get it to only show post from same cat.’ is closed to new replies.
Skip to toolbar