CPT template inherit site theme CSS classes?

[ad_1]

I am fairly new to WordPress development and making a plug-in just for a fun personal project. I have taken some tutorials and am trying to do everything the best way possible. I have a CPT I created as part of the plug-in that has custom metadata fields. So I had to create a template page in order to display those metadata fields.

What I can't seem to figure out or properly google is how to get my new template page to know about and incorporate the site's theme CSS classes. I would like it to be theme-agnostic so it looks like the default single template regardless of which theme is being used. Is there a way to say, for example, H2 headers should all copy their CSS classes from some other source? Or maybe to just extend the existing single template without creating a totally separate replacement? Or is my best bet just to create a companion theme to go with my plug-in and recommend they always be used together lest there be differences in the post type presentation?

[ad_2]

 

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