Maybe this case very easy for some blogger expert or web coders, but i am very confused to solve this issue.
Template link
And i was looked around but no luck.
Real JS before
I already worked with below JS. Tryng to mix up but still failed. IF you not mind, please add more function to show certain/specific label.
Example : Archiver, Software, Compression. I want Archiver & Software and hide for Compression. Because label is set ordered by alphabet.
Thank you!
I have edited the JS like below, but still show first label only. Where is the mistake?
Template link
And i was looked around but no luck.
Real JS before
JavaScript:
function postCat(e,a){var s=e[a].category;return s?'<span class="postCat" data-cat="'+s[0].term+'"><a href="/search/label/'+s[0].term+'">'+s[0].term+"</a></span>":""}
I already worked with below JS. Tryng to mix up but still failed. IF you not mind, please add more function to show certain/specific label.
Example : Archiver, Software, Compression. I want Archiver & Software and hide for Compression. Because label is set ordered by alphabet.
JavaScript:
function postCat(e,a){var s=e[a].category;return s?'<span class="postCat" data-cat="'+s[0].term+'"><a href="/search/label/'+s[0].term+'">'+s[0].term+"</a></span>":""}
// 1ST BEAUTY =====================
/**
* @param {Array} posts
* @param {number} index
* @param {string} category
* @return {?}
*/
function postCat(posts, index, category) {
category = posts[index].category;
return category ? '<span class="postCat" data-cat="' + category[0].term + '"><a href="/search/label/' + category[0].term + '">' + category[0].term + "</a></span>" : "";
}
JavaScript:
function postCat(e,a){var s=e[a].category;return s?'<span class="postCat" data-cat="'+s[0].term+'"><a href="/search/label/'+s[0].term+'">'+s[0].term+"</a></span>":""}
// 2nd BEAUTY =====================
function postCat(posts, index) {
var category = posts[index].category;
return category ? '<span class="postCat" data-cat="' + category[0].term + '"><a href="/search/label/' + category[0].term + '">' + category[0].term + "</a></span>" : "";
}
Thank you!
I have edited the JS like below, but still show first label only. Where is the mistake?
JavaScript:
Last edited: