WordPress.org

Ready to get started?Download WordPress

Forums

wp_dropdown_pages - styling the dropdown menu with css (1 post)

  1. lowercase001
    Member
    Posted 4 years ago #

    I am using the wp_dropdown_pages tag to generate a list of pages that show in a dropdown menu.

    I can't work out how to style this form menu - where does the code come from? I have other form fields/dropdowns styled throughout my site but can't work out where to add the class for this one. Code is...

    <form action="<?php bloginfo('url'); ?>/" method="get" >
    <?php
    	$select = wp_dropdown_pages('show_option_none=Select An Artist&show_count=1&orderby=name&echo=0&child_of=4');
    	$select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
    	echo $select;
    ?>
    	<noscript><input type="submit" value="View" /></noscript>
    	</form>

    Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic