wordpress - Allow client to edit jquery slider -


i add slider client's wordpress site such owl carousel or jquery plugin provides full page background slider. client able edit slides within wordpress dashboard.

what best way go this?

i had same exact situation.

1) install simple image widget plugin

2) register new sidebar each image https://codex.wordpress.org/function_reference/register_sidebars

3) under dashboard -> appearance -> widgets -> add image each sidebar created

4) display each sidebar in carousel using <?php dynamic_sidebar( 'your-sidebar-name' ); ?>

works treat!

to register sidebars said in step 2, paste functions.php file (this 3 sidebars, add more if need more images):

if (function_exists('register_sidebar')) {     register_sidebar(array(         'name'=> 'banner slide 1 picture',         'id' => 'image3',         'before_widget' => '',         'after_widget' => '',         'before_title' => '',         'after_title' => '',     ));     register_sidebar(array(         'name'=> 'banner slide 2 picture',         'id' => 'image2',         'before_widget' => '',         'after_widget' => '',         'before_title' => '',         'after_title' => '',     ));     register_sidebar(array(         'name'=> 'banner slide 3 picture',         'id' => 'image3',         'before_widget' => '',         'after_widget' => '',         'before_title' => '',         'after_title' => '',     ));  } 

then replace images in html with:

<?php dynamic_sidebar( 'image1' ); ?>` <?php dynamic_sidebar( 'image2' ); ?>` <?php dynamic_sidebar( 'image3' ); ?>` 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -