Note that there are some explanatory texts on larger screens.

plurals
  1. POimplement multiple slider instances through wordpress plugin
    text
    copied!<p>i have customised the smooth div scroll jquery plugin (<a href="http://smoothdivscroll.com/" rel="nofollow">http://smoothdivscroll.com/</a>) and implemented it in wordpress as a wordpress plugin along with an options page you can view the slider here <a href="http://dev.linuxfreakz.com/?page_id=2" rel="nofollow">http://dev.linuxfreakz.com/?page_id=2</a> , i have created an options page in wordpress admin which has 4 options to select the slider title , background and arrows color and category of posts . the slides are wordpress posts and the images inside them are their featured images . the slider can be currently used with a shortcode , this is all fine and working .</p> <p>the problem is that now i am supposed to add multiple sliders that can have different options selected and can be used on a single page through the options page and i am confused as how to get this done . can some wordpress guru please point me in the right direction i am really running out of time here , i don't need the whole code just an idea as how i could actually get this done and i am pretty good at php and wordpress myself usually .</p> <p>any help would be appreciated , thank you . </p> <p>here is the code that pulls the posts and generates the slider that i am currently using </p> <pre><code>function sds_display_slider() { global $post; $sds_category2 = (get_option('sds_category') != false) ? get_option('sds_category') : 1; $sds_title2 = (get_option('sds_title') != '') ? get_option('sds_title') : 'Smooth Slider'; $sds_bgcolor2 = (get_option('sds_bgcolor') != '') ? get_option('sds_bgcolor') : '#dedede'; $sds_navcolor2 = (get_option('sds_navcolor') != '') ? get_option('sds_navcolor') : '#9e1b32' ; $plugins_url = plugins_url(); echo '&lt;div id="carousel" style="background-color:'.$sds_bgcolor2.'!important;"&gt; &lt;style&gt; div.scrollingHotSpotLeft {background-color:'.$sds_navcolor2.';} div.scrollingHotSpotRight{background-color:'.$sds_navcolor2.';} &lt;/style&gt; &lt;h2&gt;'.$sds_title2.'&lt;/h2&gt; &lt;div id="makeMeScrollable"&gt;'; query_posts('post_type=post&amp;posts_per_page=-1&amp;cat='.$sds_category2.'&amp;order=ASC'); if ( have_posts() ) :while ( have_posts() ) : the_post(); $img_attached_url = wp_get_attachment_image_src( get_post_thumbnail_id($post-&gt;ID), 'medium'); $img_attached = $img_attached_url[0]; $post_heading = get_the_title($post-&gt;ID); $post_text = substr(get_the_excerpt(),0,180)."..."; $link = get_permalink($post-&gt;ID); echo '&lt;div class="contentBox"&gt; &lt;a href="'.$link.'"&gt; &lt;img src="'.$img_attached.'"&gt;&lt;/a&gt;&lt;br&gt; &lt;a href="'.$link.'"&gt;&lt;h2&gt;'.$post_heading.'&lt;/h2&gt;&lt;/a&gt; &lt;p&gt;'.$post_text.'&lt;/p&gt; &lt;/div&gt;'; endwhile; endif;wp_reset_query(); echo '&lt;/div&gt; &lt;/div&gt;'; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload