WP Astra, Replace Post Publish Date to Post Modified Date

natew

Registered Member
Joined
Sep 30, 2021
Messages
99
Reaction score
24
I'm using Astra theme and I'm trying to figure out how to replace default published date into "Last updated on" date.
I've tried with WPCode and WP Last Modified Info plugins, but they are just adding "Last updated on" date, not replacing default one...

Is this even possible with Astra?
Also is it possible to edit author page to add bio instead of just list of posts by the author?
 
I'm using Astra theme and I'm trying to figure out how to replace default published date into "Last updated on" date.
I've tried with WPCode and WP Last Modified Info plugins, but they are just adding "Last updated on" date, not replacing default one...

Is this even possible with Astra?
Also is it possible to edit author page to add bio instead of just list of posts by the author?
Adding to what @RoiBox told you

For the second part there are many ways to do this. But basically the author page is actually a template, that you could be editing all at once. There are many options, for example:

1. With Elementor you can edit such templates very easily and adapt to your exact needs and this applies to the whole site
2. There are very specific plugins, in this case to edit just the author page, like Ultimate Member
3. You can go the pro way, and just edit the astra template for author. In the theme folder of Astra, you may find a file called author.php. First you need to install a child theme. If you don't know how to do this, check Google, it's very easy. Then copy the author.php file to your new child theme folder and then edit in PHP accordingly to adapt it to your needs.
 
it may require some custom coding. gfo to your template file i mean your theme file .find content.php or entry-meta.php file. Open the template file.
you may find this code
<span class="posted-on"><?php echo get_the_date(); ?></span>
replace this line with this new code
<span class="posted-on">Last updated on <?php echo get_the_modified_date(); ?></span> and save changes.
This new code will display "Last updated on" followed by the modified date of the post


adn to edit the author page to add a bio instead of just a list of posts can also be achieved use this steps
go to your theme folder. find author.php file. and edit . and you will see those line of codes or similar loops .
<?php while ( have_posts() ) : the_post(); ?>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<!-- Other post information here -->
<?php endwhile; ?>

Just replace the loop mentioned above with the following code

<?php
$author_id = get_query_var('author');
$author = get_user_by('ID', $author_id);
?>

<h2><?php echo $author->display_name; ?></h2>
<p><?php echo $author->description; ?></p>

<?php while ( have_posts() ) : the_post(); ?>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<!-- Other post information here -->
<?php endwhile; ?>

and save changes . Hope so this modification will help you to solve your Astra theme issue .
 
Ok, thank you everybody. This shouldn't be this complicated
One would expect something so basic to be one click option in dashboard...
 
3. You can go the pro way, and just edit the astra template for author. In the theme folder of Astra, you may find a file called author.php.
Unfortunately there is no such file
 
Adding to what @RoiBox told you

For the second part there are many ways to do this. But basically the author page is actually a template, that you could be editing all at once. There are many options, for example:

1. With Elementor you can edit such templates very easily and adapt to your exact needs and this applies to the whole site

I don't see option to edit author template in Elementor ...
 
Back
Top