• 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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Blake

    (@paulblakemedia)

    Have you considered a slider plugin? Many are free such as Revolution and EZ Slider.

    Thread Starter Rahul Kashyap

    (@rahul0010)

    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>
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    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?

    Thread Starter Rahul Kashyap

    (@rahul0010)

    thanks to all i will try javascript forum ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to create wordpress slider?’ is closed to new replies.