Hi Metdark,
You will need to customize the theme for this. You can also consult with a developer.
Thanks!
Hi Em,
For example I found the file that edit each post on the category page.
public_html/wp-content/themes/astra/template-parts/content-blog.php
If anyone can point me to the parent template that calls this template, that’s all I need.
Thanks!
Chris
Hello @metdark,
You can duplicate the archive.php in your child theme and rename it to category.php and add your customizations there.
Read more about the WP Template hierarchy here on which files are called when – https://wphierarchy.com/
Another approach will be using Actions and Filters to modify the content. Here is the visual representation of actions in Astra Theme on category page – https://developers.wpastra.com/theme-visual-hooks/category/uncategorized/
Thanks @nikschavan!
Your explanation and https://wphierarchy.com/ was very helpful.
For my case I had to duplicate archive.php and rename it to home.php.
This worked.
For header title, I’ve used <?php astra_the_title( ‘<h1 class=”entry-title” itemprop=”headline”>’, ‘</h1>’ ); ?>
I will style it nicer later.
Hopefully I just have 1 category, if not I have to do conditional php for different description.
For testing I’ve tried what you’ve mentioned and other combinations and they did not work
Somehow my category name “Articles” is blog Posts Index page.
Which is weird because I thought it was a category, since the other category was the default “Uncategorized”.
I wonder is it because it’s domain.com/articles?
The home.php is displayed on blog front page and it is a collection of all the posts so the text archive is displayed there.
BTW – You can add descriptions and update title for the categories from the WordPress admin as well – https://cl.ly/tHrW
These are displayed in the frontend on the category archive.
I’ve added the description as per screenshot.
What do I have to do to get the description showing?
I tried some combinations from here and other pages as well. https://github.com/brainstormforce/astra/blob/master/inc/core/common-functions.php#L814
Nothing seems to generate the description, only the title.
This is what I thought would be the closest <?php the_archive_description(); ?>, so I added it manually.
Your name appear quite frequently in those pages 🙂
Hello @metdark,
This is done by default in Astra. The archive description is displayed under the archive title. For eg under uncategorized – https://cl.ly/tRl3
Hi @nikschavan,
I see, I will check this out.
Thanks a lot!