Posted: August 26, 2022 at 10:33 am
|
I found in an earlier discussion that adding the following CSS would take out the title “Archives” from the Events List page. .post-type-archive-espresso_events .page-title { This works great to remove that. I’m wondering how I would modify it so that that page would have the title of that page (e.g. Events or Courses) rather than having nothing. |
Do you have an example for us to look at? Does your theme display the title of the page on archives pages? If I understand correctly, that’d be the easiest way to do it. Also, are you using the Event List settings? https://monosnap.com/file/hirzqOyv9oAAaqAG4LXbcJCfZR8Zns |
|
|
Here’s the url. https://www.affinitywellnesseducation.com/courses/ I changed /events/ to /courses/ I am using the event list settings. I used CSS code given before to take out the word “Archives”. I would like for it to say “Courses” or whatever I specify that /xxx/ to be. |
Hi there, The ‘Archives: {post_type}’ output is generated by WordPress when a theme uses the_archive_title() to output that text. That function has a hook available to change the output so you can do all of the above using a snippet like this: https://gist.github.com/Pebblo/25705b6b4fd3ad3f706330304fca62fb That function simply returns whatever have been set as the event slug (default is ‘events’) with the first letter capitalized. So rather than ‘Archives: Events’ it will (in your case) just return ‘Courses’. You can add that to a custom functions plugin on your site, we have some documentation on creating one here: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ |
|
|
Thank you for this. To get rid of this, I have to put: What do I need to do so it says “Courses” rather than “Archives: Events”? |
Is the default output from WordPress so it sounds like that code isn’t running (or running to late). My snippet pulls in whatever has been set as the event slug in Event Espresso -> Events -> Templates -> Event Slug. That by default is just ‘events’ (but I’m assuming yours is ‘courses’) and returns that string with the first letter capitalized with no ‘Archives: ‘ prefix, which is why I don’t think that code is actually running. Where did you add my snippet on the site? |
|
|
I added it to the Custom CSS for the Theme. Adding other snippets in there has an impact on the site. |
The above snippet I gave you is not CSS, its PHP and can not be loaded via the above option. You can add that to a custom functions plugin on your site, we have some documentation on creating one here: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ |
|
|
ah, i see… oops. |
Easily done 🙂 Add the above into a custom functions plugin should get it fixed up. |
|
|
Working like a charm. Thank you. |
The support post ‘Specifying the title for the Events List’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.