WordPress.org

Ready to get started?Download WordPress

Forums

Custom Loop For Slider (3 posts)

  1. snipeseye
    Member
    Posted 5 years ago #

    Hi,

    I am trying to create a custom loop so that it shows the latest 4 posts in a slider. The slider that I am using is a modification of jqueryfordesigners .com/demo/coda-slider.html (remove the space between the .com as the post gets marked as spam)

    I tried using different variations of the loop to display the first four posts, but I can't get it to format the way I wanted as I want the post to be displayed with the title and content and then the title to be displayed again. With referance to the link above, I want the post to be displayed in each panel and the title to be displayed in the tabs.

    My home.php currently looks like:

    <div class="panel" id="entry1"><h2>Title 2</h2><p>Content here.</p></div> 
    
    <div class="panel" id="entry2"><h2>Title 2</h2><p>Content here.</p></div> 
    
    <div class="panel" id="entry3"><h2>Title 3</h2><p>Content here.</p></div> 
    
    <div class="panel" id="entry4"><h2>Title 4</h2><p>Content here.</p></div> 
    
                    </div>
                </div>
                 <ul class="navigation">
                    <li><a href="#entry1">Title 1</a></li>
                    <li><a href="#entry2">Title 2</a></li>
                    <li><a href="#entry3">Title 3</a></li>
                    <li><a href="#entry4">Title 4</a></li>
                </ul>

    Can you guys help me out?

  2. snipeseye
    Member
    Posted 5 years ago #

    Bump. Please can you'll help me out?

  3. snipeseye
    Member
    Posted 5 years ago #

    Would it be efficient to have two loops, one to first display the post content and the other in the slider and the other to display the titles? They can then be matched by having the post id be the link.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.