• Hi,

    I am using “wp_dropdown_pages” function to list selected pages in a dropdown menu.

    “wp_dropdown_pages” function works fine with my currently selected 3 pages.(page ids=15,55,80) However, I am planning to add more than 100 pages to my dropdown list and it will be very long to display.

    Is there a way to implement a vertical scrollbar to my dropdown list? i mean, when users click on the dropdown, it shows the first 10 elements on my list and when users use the vertical scrollbar, other menu items showup?

    Thank you for your help,

    Here is my code:

    <form action="<?php bloginfo('url'); ?>" method="get">
    
    <?php 
    
    $select=wp_dropdown_pages('show_option_none=Please Select&show_count=1&include=15,55,80&sort_column=ID&echo=0');
    $select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
    echo $select;
    
    ?>
    <noscript><input type="submit" value="View" /></noscript>
    
    </form>

The topic ‘wp_dropdown_pages vertical scroll’ is closed to new replies.