Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

Yourit on "add class to archives widget in functions.php"

$
0
0

Hi,

I'm currently trying to add a Bootstrap class to the <select> of the archives widget into the functions.php file, so the select dropdown is styled correctly when checked in the CMS, but somehow i'm not able to find out what i'm doing wrong.

This is how it looks like right now(HTML):
<select name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">

This is how it should look like(HTML):
<select class="form-control" name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">

I've tried a str_replace in functions.php but it won't affect wp_get_archives.

Could someone please help me find a solution?
Thanks in advance!!!


Viewing all articles
Browse latest Browse all 8245

Trending Articles