hlashbrooke / WordPress-Plugin-Template

A robust code template for creating a standards-compliant WordPress plugin.
https://hughlashbrooke.com/
GNU General Public License v2.0
1.03k stars 329 forks source link

How to display html on external pages of the site? #83

Closed karpinskyi closed 5 years ago

karpinskyi commented 5 years ago

How to display this code on the pages of the site? echo ''; How to do it correctly, according to the architecture of this plugin?

I can't understand the structure of the plugin. Do I need to create a file for an external template, or do I need to create a function in the class? Help me please.

jonathanbossenger commented 5 years ago

@karpinskyi this repository is a plugin template, which you can use as a foundation for building your own WordPress plugins. You will however need to have a good understanding of how to build your own WordPress plugins in the first place, to be able to make use of this template.

I recommend reading the WordPress Plugin Developer Handbook

As to your specific question, you could probably do so by way of a shortcode

karpinskyi commented 5 years ago

I want to create my own plugin. I don't need a shortcode. I know php js. But I can't figure out where to add this code to output it.