Remove post-title if it is a star
-
Some posts only have content, so how can I check if the post-title is a star or not? Right now, when the title is empty, it leaves a blank space.
I want to have a check: if the post-title is a star, dont print it on the screen. if not, print it! I tried this, but nothing happened:<script>
var postTitle = %post_title%;
if(postTitle == “*”){
//Do nothing
}else{
document.write(“<h2>%post_title%
</h2>”);
}
</script>
- The topic ‘Remove post-title if it is a star’ is closed to new replies.