wordpress plugin random post slider
Different sliders (2 posts)

  1. rosdeal
    Posted 3 years ago #

    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?


  2. jasonayer
    Posted 3 years ago #

    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;
    	$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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • wordpress plugin random post slider
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic