How can I use a self-made WordPress plugin to output for example a custom menu or custom HTML to a specific location? The only places I managed to output content is in wp_head
and wp_footer
, but is it possible to get content to show up anywhere else? Is it even possible to force the plugin to output the HTML for example inside a specific div
or a DOM element?
Example scenarios
-
I want to add a custom button that triggers a menu or modal, but the button needs to be located inside the header and I also need a place for the modal HTML before the footer (example).
-
I want to add custom made “social share buttons” to every page and need a place to output the HTML after the page title.
Just to give you a feeling of what I’m trying to do…
Maybe I’m just way off track. I am new to this, but I am eager to learn.
“Teach me the ways of the force”
Appreciate any help, Thanks 🙂