SOLVED - How to replace "Reading Time" with "Author"?
-
- Jr. Bludit
- Posts: 6
- Joined: Fri Feb 21, 2025 1:57 pm
- Been thanked: 1 time
On the home page as well as individual blog post pages, right below the post title, it says, "[Publish Date] - Reading time: [X] minutes". I'd like it, instead, to say, "[Publish Date] - Published by: [author]".
I've poked around quite a bit but I can't seem to figure it out.
I've poked around quite a bit but I can't seem to figure it out.
Last edited by DonnyBahama on Fri Mar 14, 2025 8:40 pm, edited 1 time in total.
-
- Jr. Bludit
- Posts: 6
- Joined: Fri Feb 21, 2025 1:57 pm
- Been thanked: 1 time
Thanks, but what should the code look like?
- abu
- Ssr. Bludit
- Posts: 11
- Joined: Mon Sep 12, 2022 9:23 pm
- Location: Switzerland
- Has thanked: 3 times
- Been thanked: 1 time
Well, it's not that difficult to realize, and I have a good day up to now.
Please see the following patch.
HTH
abu
Please see the following patch.
HTH
abu
Code: Select all
diff --git a/bl-themes/blogx/php/home.php b/bl-themes/blogx/php/home.php
index cff53455..e927993c 100644
--- a/bl-themes/blogx/php/home.php
+++ b/bl-themes/blogx/php/home.php
@@ -25,7 +25,7 @@
<!-- Creation date -->
<h6 class="card-subtitle mt-1 mb-4 text-muted">
<i class="bi bi-calendar"></i><?php echo $page->date(); ?>
- <i class="ml-3 bi bi-clock-history"></i><?php echo $L->get('Reading time') . ': ' . $page->readingTime(); ?>
+ <i class="ml-3 bi bi-person"></i><?php echo $L->get('Published by') . ': ' . $page->username(); ?>
</h6>
<!-- Breaked content -->
diff --git a/bl-themes/blogx/php/page.php b/bl-themes/blogx/php/page.php
index 7b60f3d1..f1e2703e 100644
--- a/bl-themes/blogx/php/page.php
+++ b/bl-themes/blogx/php/page.php
@@ -17,7 +17,7 @@
<?php if (!$page->isStatic() && !$url->notFound()): ?>
<!-- Creation date -->
- <h6 class="card-subtitle mb-3 text-muted"><?php echo $page->date(); ?> - <?php echo $L->get('Reading time') . ': ' . $page->readingTime() ?></h6>
+ <h6 class="card-subtitle mb-3 text-muted"><?php echo $page->date(); ?> - <?php echo $L->get('Published by') . ': ' . $page->username() ?></h6>
<?php endif ?>
<!-- Full content -->
-
- Jr. Bludit
- Posts: 6
- Joined: Fri Feb 21, 2025 1:57 pm
- Been thanked: 1 time
Thank you! Super helpful! I got the changes made.