Problem: I am using the Roam theme. My WordPress Archives are displaying content, but the title of each archive page is "Archive". I would like to display the name of the post type instead, but I cannot change it in the WordPress Archive.
Solution: If you want to modify the title of any archive, it looks like you can register your own filter in the archive PHP file corresponding to that archive, and add any arbitrary text. For example, if you have a custom post type with the slug "job-opening", then you will copy the archive.php file from the parent roam directory into your child theme directory and change the name to archive-job-opening.php. Just before the line get_header();, insert your filter like this:
... add_filter('roam_mikado_title_text', function($title){ return 'Your custom Job Openings archive title'; }, 10); get_header(); ...
Relevant Documentation:
https://developer.wordpress.org/themes/basics/template-hierarchy/
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 3 replies, has 2 voices.
Last updated by 5 years, 10 months ago.
Assisted by: Christian Cox.