我在WordPress中有一个表单,当单击时,它们会检索过滤后的帖子。我想从表单中选取选项,并将其像普通链接一样放置。这能做到吗?提前感谢大家:)
<form action="" method="get" id="filter">
<select id="sort_by" name="sort_by" onchange="this.form.submit()">
<option value="most_recent"<?php if( !$_GET[\'sort_by\'] || $_GET[\'sort_by\'] == \'most_recent\' ) echo " selected"; ?>><?php print
__(\'Most Recent\', \'bo\'); ?></option>
<option value="most_favorites"<?php if( $_GET[\'sort_by\'] == \'most_favorites\' ) echo " selected"; ?>><?php print __(\'Most Favorites\', \'bo\'); ?></option>
<option value="most_viewed"<?php if( $_GET[\'sort_by\'] == \'most_viewed\' ) echo " selected"; ?>><?php print __(\'Most Viewed\', \'bo\'); ?></option>
<option value="most_commented"<?php if( $_GET[\'sort_by\'] == \'most_commented\' ) echo " selected"; ?>><?php print __(\'Most Commented\', \'bo\'); ?></option>
</select>
</form>