• Resolved ccbit

    (@ccbit)


    I’m building a theme with the option to choose a specific slider for a page or post. I want to implement a drop-down box where the user can choose a slider from the list.

    Now, is there a way to get all available slider-ids and slider-titles? I saw this once from an other slider plugin.

    Hope someone could give me a hint.
    thanks a lot.

    https://wordpress.org/plugins/ml-slider/

Viewing 1 replies (of 1 total)
  • Thread Starter ccbit

    (@ccbit)

    Aaah okay, I found a solution. Didn’t see that those slides are posts and are saved in table wp_posts. So it’s very easy to get those informations:

    <?php
    $myposts = get_posts(array('post_type' => 'ml-slider'));
    var_dump($myposts);
    ?>

    Now we got the titles and id’s of all slides available.
    Cheers

Viewing 1 replies (of 1 total)
  • The topic ‘Get all slider-id's and titles’ is closed to new replies.