CPT registration problem.

Hey,

**BACKGROUND**

I am having a unique problem. I am adding some new functionality to a website that a past developer created. All the functions in the code are named after doctor who, marvel comics, and memes; and the comments are mostly just what music this developer was listening to at the time.

I tried adding a custom post type but it simply will not. I have triple checked and got another developer to be a second set of eyes and by all accounts it should work. However, I noticed that the old developer registered all their CPTs through a class they created (IE: using the class function PostTypes::register() to pass very few arguments into the CPT object).

I understand that I could follow this convention and extend the function they created with all their CPTs in it, but I need more flexibility for the Labels; the custom post type is for announcements for a specific upcoming event and the dashboard name is labelled “Ratification Vote 2022 Announcements” as per client request; and all other labels were going to simple be announcement(s).

Following normal WP conventions, this is extremely easy, but the past developer has cornered me into having to declare it simply as “Announcement” and then have the class do the rest of the work, which will cause the dashboard menu item to read as “Announcements” –which doesn’t work because this union site has several different types of announcements.

Changing anything thus far continually breaks the site and causes critical fails.

​

**MY QUESTION**

Do Custom Post Type Classes just override the ability to add any CPTs normally after the fact? Or is there something I can look for to alter in order to add CPTs normally? I would like to stop reading old memes and comic book references to try and understand what this person coded.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer