Featured Posts Slideshow
[closed] Show Pages featured image rather than posts (4 posts)

  1. onesoftindiana
    Posted 3 years ago #

    Hey..Really Sorry, for this.
    I asked everyone, but no one has answered it.

    I have this theme set up that takes images from posts that has featured image and displays on home page slider. Instead of that I wanted to have 3 custom images that i want to display ( or if not possible images from pages and not posts )

    Here is the code that i think is responsible for it.

    <?php get_header(); wp_enqueue_script( 'slider-main', get_template_directory_uri() . '/js/slider.js' ); ?>
          <div id="slider">
             	<div id="slideshow"><ul class="bjqs">
    			<?php $sbargs = smallbusiness_ppp(); query_posts( $sbargs );
    			if (have_posts()) : while (have_posts()) : the_post();?>
                <li><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('slide-thumb'); ?><div class="post-slide"><h2><?php the_title(); ?></h2><?php  $sbExcerptLength=30; the_excerpt(); ?></div></a></li>
    			<?php endwhile; endif; ?>

    Please tell me what changes in code should I make to accomplish this. I would be really thankful to you. No one has helped me in this regard. I hope you can cause you have made so many slideshow plugins. Please..please..please..


  2. bcworkz
    Posted 3 years ago #

    Create 3 posts that are unique in some way, special category, tag or something else easy to query. Make one of your images the featured image of each post. Alter the definition of $sbargs so the query returns your special posts instead of what it does now. See Function Reference/query posts for ways to restrict the query results.

  3. onesoftindiana
    Posted 3 years ago #

    Currently it allows only 2 posts on slider. I want to display 3 or more. I don't know much of coding. What changes should I make for that.

  4. cubecolour
    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Featured Posts Slideshow
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic