Skip to content

Commit

Permalink
fix: author page description display
Browse files Browse the repository at this point in the history
  • Loading branch information
KawaiiZapic committed Sep 22, 2024
1 parent 9e9bee0 commit c7e56ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@
<?php
if ($this->archiveType === 'index') {
$this->options->description();
} else if ($this->archiveType === "category" || $this->archiveType == "tag" || $this->archiveType === "search") {
} else if (in_array( $this->getArchiveType(), ["category", "tag", "search"])) {
$description = Matecho::tpVersion("1.2.1") > 0 ? $this->archiveDescription : $this->description;
if ($description) {
echo $description;
} else {
printf("共 %d 篇文章", $this->getTotal());
}
} else if ($this->getArchiveType() === "author") {
printf("共 %d 篇文章", $this->getTotal());
} else {
echo $this->archiveType;
}
Expand Down

0 comments on commit c7e56ab

Please sign in to comment.