Limit to a dynamically set category
-
Hi,
thanks for the excellent plugin, it just does what it is supposed to do. π
I am just looking at the source code and try to extend the plugin so I can limit the random post to a dynamically set category. I saw
function rpl_change_ptype( $args ) { $args['category_name'] = 'your_category_name_goes_here'; return $args; } add_filter( 'random_post_args', 'rpl_change_ptype' );What i want is to set the category dynamically within my template. Basically I want to call random post link with a category slug
<?php random_post_link('Feeling lucky','your_category_name_goes_here'); ?>
Should be not difficult to do I assume but I am new to wordpress development …Thanks buddies
martin
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Limit to a dynamically set category’ is closed to new replies.