Reputation: 244
Here is the site in question. I want to change the title from "category archive" to news.
According to this article (community.theme.co/forums/topic/custom-category-pages/) I need to create a file called "category-news.php" in the child theme. My issue is that I have no idea what to put in that file.
According to the template hierarchy laid out in this article, the news page should be using "index.php" as its template file. Index.php reads
<?php x_get_view( x_get_stack(), 'wp', 'index' ); ?>
Essentially my issue is that I have no idea what the content of category-news.php should be if I want to change the title. And I don't even really understand where the current title is coming from.
Any help would be much appreciated. Thanks.
Upvotes: 1
Views: 1541
Reputation: 976
I spend an hour trying to find this template in X Theme. So an answer might still be relevant, even though the question is quite old.
1. Solution — If you just need to change the text
You can change the headline and description from the Categories section in the WordPress admin. X Theme adds a few extra input fields named "Archive Title" and "Archive Subtitle" and you can type in whatever name you like.
Have a look at the ThemeCo forum: https://theme.co/apex/forums/topic/category-archive-page/
2. Solution — Edit the template ( PHP and HTML )
The template is called _landmark-header.php
- but the placement is far from obvious and the directory changes depending on the X Theme stack you are using. e.g ethos, icon, integrity or renew.
This can be echoed or dumped with the x_get_stack()
function.
The full path to the template file is;
wp-content/themes/x/framework/legacy/cranium/headers/views/*stack name*/_landmark-header.php
This file can be overwritten from your child theme, if you copy the file and replicate the folder structure in your child theme. e.g
wp-content/themes/*x-child*/framework/legacy/cranium/headers/views/*stack name*/_landmark-header.php
Be aware that this looks like a legacy template, so it might not work with future theme updates.
Upvotes: 1