This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function naked_print_tax_summary($tax = 'category') { | |
$tax_summary = naked_get_tax_summary($tax); | |
if(!empty($tax_summary)) { | |
ob_start(); ?> | |
<ul> | |
<?php foreach($tax_summary as $tax_item): ?> | |
<li> | |
<a href="<?= $tax_item['link']; ?>"><?= $tax_item['name']; ?></a> | |
<span class="posts-count"><?= $tax_item['count']; ?></span> | |
<?php if(isset($tax_item['childs']) && !empty($tax_item['childs'])): ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
function goURL(){ | |
var url = document.getElementById("selectID").options[document.getElementById("selectID").selectedIndex].getAttribute("value"); | |
window.location = url; | |
} | |
</script> | |
Sort by | |
<select id="selectID" onchange="javascript:goURL();"> | |
<option value="?sort_by=title&sort_order=ASC">By title(ASC)</option> | |
<option value="?sort_by=created&sort_order=ASC">By creation date(ASC)</option> |