Dynamic single page WordPress

I have a single page in wordpress but it has 3 slides of text using orbit slider.Orbit slider works like this (one slide) :

 <li>
<div class="small-12 large-6 columns text">
<h1>Scelerisque urna!</h1>
<img class="line" src="img/small-line.png">
<p>Urna turpis dictumst porttitor amet scelerisque</p>

<p>Phasellus nec ultricies risus</p>
</div>
<div class="small-12 large-6 columns"><img src="img/car.jpg"></div>
 </li>

so one slide is in one <li></li> . How can i make a new post, then in there have a option like “Add new slide” so a new text editor appears or something where the user can put an image and text for the second slide and if he wants add a new slide ?

Read More

one slide :
http://pokit.org/get/?666cf2d698a981e7cb0605fa7c2ca782.jpg

second slide :
http://pokit.org/get/?591d6f998229d24f1442ae0b635a0797.jpg

I forgot to say I want an option to add unlimited slides not only three

Related posts

Leave a Reply

2 comments

  1. Three ways of doing this:

    1. Use the post/page attachments as slides. Relevant WordPress function: get_children(). Pass the post/page ID and retrieve all image attachments. Loop through them and build your output.

    2. Use a custom meta box with repeatable uploading fields. Solution here in SO: Adding custom image fields and other fields at the same time . Relevant function: get_post_meta. Get the meta data and loop.

    3. Use a plugin to add repeatable uploading fields. Solution at WordPress Answers. Get the meta data with the plugin custom functions or with get_post_meta and loop.