Support » Plugin: wordpress plugin random post slider » Different sliders

  • Is it possible to get different sliders e.g. one slider per Category? I think many are interested in this question – but i could find any answer.

    And: what ist the correct shortcode? For Example: If there are is one category with ID 12 and another one with ID 24, which shortcode is necessary to get a slider for postings with category ID 12 on one page and to get a slider for postings with category ID 24 on another page?

    http://wordpress.org/extend/plugins/wordpress-plugin-random-post-slider/

Viewing 1 replies (of 1 total)
  • jasonayer

    (@jasonayer)

    Yes, this takes a little modification to the plugin code. Go to your plugins editor on your WordPress admin dashboard and pull up the files for the plugin. Select <b>wordpress-plugin-random-post-slider/wordpress-plugin-random-post-slider.php</b> to edit. It should already be defaulted to that. Next look up this bit of code…

    # gopiplus shortcode
    function gopiplus_shortcode( $atts )
    {
    	global $wpdb;
    	//[wp-post-slider]
    
    	$sSqlMin = "";
    	$gopiplushome = "";
    	$post_tag = "";
    
    	...

    Next, add this bit after the //[wp-post-slider] part…
    extract( shortcode_atts( array( 'id_list' => '' ), $atts ) );
    Next, look down a bit and you will see this line of code…
    $qp_category = get_option('gopiplus_query_posts_category');
    Replace it with this…
    $qp_category = (isset($id_list) && $id_list != '') ? $id_list : get_option('gopiplus_query_posts_category');
    You’re done!

    Now you cant enter [wp-post-slider id_list=”3″] or [wp-post-slider id_list=”1,2,3″] like you would in the regular settings.

Viewing 1 replies (of 1 total)
  • The topic ‘Different sliders’ is closed to new replies.