How to create wordpress slider?
-
hello developers,
i need your help coz i am using SMOF wp framework but i am new in PHP so please can you say me how to create slider for wordpress theme
here is slider exp.
Below is just a basic example of how you may do it.
$slides = $data[‘example_slider’]; //get the slides array
foreach ($slides as $slide) {
echo $slide[‘title’];
echo $slide[‘url’];
echo $slide[‘link’];
echo $slide[‘description’];
}you can check official Smof documentation here
aquagraphite.com/2011/11/smof-documentation
-
Have you considered a slider plugin? Many are free such as Revolution and EZ Slider.
thanks for reply @blake
i have created this php code for slider but i want to use show this slider in jquery how can i do this please tell me
here is code
<div id="sliders"> <?php foreach ($sliders as $slide) { echo '<ul>'; echo '<li> <a href="'. $slide['link']. ' "> <img src="' . $slide['url' ] . '" /> </a> <div class="flex-title">'. $slide['title']. ' </div> <div class="flex-caption">'. $slide['description']. ' </div> </li></ul>'; } ?> </div>So you’re not using your own slider? Which plugin are you using?
Btw you may want to move your ‘
<ul>‘ outside of the foreach.consider to ask at a jQuery forum; this forum is not really the best place to get help with javascript issues.
why do you not adapt an existing jQuery slider script, for example from a plugin?
thanks to all i will try javascript forum 🙂
The topic ‘How to create wordpress slider?’ is closed to new replies.