[wp-trac] [WordPress Trac] #28492: Categories Widget Dropdown Issue
WordPress Trac
noreply at wordpress.org
Mon Jun 9 18:05:59 UTC 2014
#28492: Categories Widget Dropdown Issue
---------------------------+-----------------------------
Reporter: selinawdesign | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Widgets | Version: 3.9.1
Severity: normal | Keywords:
Focuses: |
---------------------------+-----------------------------
'''This is a follow-up to #15257.
Page in Question''': http://selinawdesign.com/wp/live-french/news/
The drop-down version of the categories widget does not seem to work, but
the list-view version does. I cleared the cache, hard refreshed, etc. and
still no luck. I viewed the page source and the list-view has "a href" for
each list-item whereas the drop-down version does not. I see that there is
a script for the dropdown to populate an "a href" but it just doesn't seem
to be working.
Whenever I select, say "Education," from the dropdown none of the posts
that are categorized "Education" populate the new page. However when I do
so from the list-view, the page changes accordingly.
Source for the dropdown:
{{{
<div class="wpb_wrapper">
<div class="vc_wp_categories
wpb_content_element"><div class="widget widget_categories"><h2
class="widgettitle">Categories</h2><select name='cat' id='cat'
class='postform' >
<option value='-1'>Select Category</option>
<option class="level-0" value="48">Education</option>
<option class="level-0" value="19">Events</option>
<option class="level-0" value="14">News</option>
<option class="level-1" value="59"> Member
Benefits</option>
<option class="level-0" value="47">Youth</option>
</select>
<script type='text/javascript'>
/* <![CDATA[ */
var dropdown = document.getElementById("cat");
function onCatChange() {
if ( dropdown.options[dropdown.selectedIndex].value > 0 )
{
location.href =
"http://selinawdesign.com/wp/?cat="+dropdown.options[dropdown.selectedIndex].value;
}
}
dropdown.onchange = onCatChange;
/* ]]> */
</script>
</div></div>
}}}
Source for list view:
{{{
<div class="wpb_wrapper">
<div class="vc_wp_categories
wpb_content_element"><div class="widget widget_categories"><h2
class="widgettitle">Categories</h2> <ul>
<li class="cat-item cat-item-48"><a
href="http://selinawdesign.com/wp/category/education/" title="View all
posts filed under Education">Education</a>
</li>
<li class="cat-item cat-item-19"><a
href="http://selinawdesign.com/wp/category/events/" title="View all posts
filed under Events">Events</a>
</li>
<li class="cat-item cat-item-14"><a
href="http://selinawdesign.com/wp/category/news/" title="View all posts
filed under News">News</a>
<ul class='children'>
<li class="cat-item cat-item-59"><a
href="http://selinawdesign.com/wp/category/news/memberbenefits/"
title="View all posts filed under Member Benefits">Member Benefits</a>
</li>
</ul>
</li>
<li class="cat-item cat-item-47"><a
href="http://selinawdesign.com/wp/category/youth-3/" title="View all posts
filed under Youth">Youth</a>
</li>
</ul>
</div></div>
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28492>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list