我有一个房地产网站,并安装了Houzez主题,有一个搜索表单字段,选项是类型,位置,最低价格等。问题是类型和位置字段垂直显示为一条线,如下图所示:My website Type Dropdown但我想让它像这样:My desire Type Dropdown ...我尝试通过类型部分id和class添加自定义css,甚至添加了js,但似乎没有任何效果。你知道怎么做吗这是类型div的代码
<div class="elementor-field-group elementor-column form-group elementor-field-group-95424d9 elementor-col-25">
<label for="form-field-95424d9" class="elementor-field-label elementor-screen-only">Type</label> <div class="elementor-field elementor-select-wrapper">
<div class="dropdown bootstrap-select houzez-field-textual form-control elementor-size-sm"><select data-live-search="true" data-size="5" name="type[]" id="form-field-95424d9" class="selectpicker houzez-field-textual form-control elementor-size-sm" data-none-results-text="No results matched {0}" tabindex="null">
<option value="">Type</option><option data-ref="commercial" value="commercial">Commercial</option><option data-ref="apartment-commercial" value="apartment-commercial"> - Apartment</option><option data-ref="building" value="building"> - Building</option><option data-ref="duplex" value="duplex"> - Duplex</option><option data-ref="factory" value="factory"> - Factory</option><option data-ref="floor" value="floor"> - Floor</option><option data-ref="office" value="office"> - Office</option><option data-ref="plaza" value="plaza"> - Plaza</option><option data-ref="plot" value="plot"> - Plot</option><option data-ref="shop" value="shop"> - Shop</option><option data-ref="warehouse" value="warehouse"> - Warehouse</option><option data-ref="residential" value="residential">Residential</option><option data-ref="apartment" value="apartment"> - Apartment</option><option data-ref="building-residential" value="building-residential"> - Building</option><option data-ref="duplex-residential" value="duplex-residential"> - Duplex</option><option data-ref="penthouse" value="penthouse"> - Penthouse</option><option data-ref="plaza-residential" value="plaza-residential"> - Plaza</option><option data-ref="plot-residential" value="plot-residential"> - Plot</option><option data-ref="room" value="room"> - Room</option> </select><button type="button" tabindex="-1" class="btn dropdown-toggle btn-light bs-placeholder" data-toggle="dropdown" role="combobox" aria-owns="bs-select-5" aria-haspopup="listbox" aria-expanded="false" data-id="form-field-95424d9" title="Type"><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner">Type</div></div> </div></button><div class="dropdown-menu" style="max-height: 257px; overflow: hidden;"><div class="bs-searchbox"><input type="search" class="form-control" autocomplete="off" role="combobox" aria-label="Search" aria-controls="bs-select-5" aria-autocomplete="list" aria-activedescendant="bs-select-5-0"></div><div class="inner show" role="listbox" id="bs-select-5" tabindex="-1" style="max-height: 205px; overflow-y: auto;"><ul class="dropdown-menu inner show" role="presentation" style="margin-top: 0px; margin-bottom: 0px;"><li class="selected active"><a role="option" class="dropdown-item active selected" id="bs-select-5-0" tabindex="0" aria-setsize="20" aria-posinset="1" aria-selected="true"><span class="text">Type</span></a></li><li class=""><a role="option" class="dropdown-item" id="bs-select-5-1" tabindex="0" aria-setsize="20" aria-posinset="2"><span class="text">Commercial</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-2" tabindex="0" aria-setsize="20" aria-posinset="3"><span class="text"> - Apartment</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-3" tabindex="0" aria-setsize="20" aria-posinset="4"><span class="text"> - Building</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-4" tabindex="0" aria-setsize="20" aria-posinset="5"><span class="text"> - Duplex</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-5" tabindex="0" aria-setsize="20" aria-posinset="6"><span class="text"> - Factory</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-6" tabindex="0"><span class="text"> - Floor</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-7" tabindex="0"><span class="text"> - Office</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-8" tabindex="0" aria-setsize="20" aria-posinset="9"><span class="text"> - Plaza</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-9" tabindex="0" aria-setsize="20" aria-posinset="10"><span class="text"> - Plot</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-10" tabindex="0" aria-setsize="20" aria-posinset="11"><span class="text"> - Shop</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-11" tabindex="0" aria-setsize="20" aria-posinset="12"><span class="text"> - Warehouse</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-12" tabindex="0" aria-setsize="20" aria-posinset="13"><span class="text">Residential</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-13" tabindex="0" aria-setsize="20" aria-posinset="14"><span class="text"> - Apartment</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-14" tabindex="0" aria-setsize="20" aria-posinset="15"><span class="text"> - Building</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-15" tabindex="0" aria-setsize="20" aria-posinset="16"><span class="text"> - Duplex</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-16" tabindex="0" aria-setsize="20" aria-posinset="17"><span class="text"> - Penthouse</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-17" tabindex="0" aria-setsize="20" aria-posinset="18"><span class="text"> - Plaza</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-18" tabindex="0" aria-setsize="20" aria-posinset="19"><span class="text"> - Plot</span></a></li><li><a role="option" class="dropdown-item" id="bs-select-5-19" tabindex="0" aria-setsize="20" aria-posinset="20"><span class="text"> - Room</span></a></li></ul></div></div></div>
</div>
</div>
字符串
我试着添加自定义css和JavaScript,但它保持不变。还试图从WordPress的主题文件编辑器添加代码,但找不到任何相关的类型下拉列表或我需要添加或修改代码的部分。
1条答案
按热度按时间lkaoscv71#
也许通过编辑这个文件你可以达到你想要的
template-parts > search > fields > type.php