I want to make a wordpress plugin, which displays my copyright at the top of the html code. so if anyone goes on my website and has a look on my website, i can display something like "made with love by my name"
the text should be only visible in the code and not be shown in the front-end.
i know it would be easier to just write the sentence in the html code, but i am trying to make a Wordpress plugin...
and Tips how i could do it? i am a very beginner with php and wordpress.
i created the basis of my plugin with this "plugin-Template"
https://github.com/hlashbrooke/WordPress-Plugin-Template
would be nice if someone could tell me in which .php? file i have to put which code.
i already tried displaying it with echo, but it didnt work...
CodePudding user response:
You should just edit the Wordpress theme and just put it in a HTML comment inside at the beginning of the file (index.php
).
<!-- MADE BY YOUR_NAME -->
CodePudding user response:
There are a lot of things around your lines that can be ambiguous, but if you had the structure go to /index.php and change these
<?php
// phpcs:ignorefile
// Silence is golden.
echo '<!-- i need to learn how to walk before to run -->';
You will see this one line in the code (if the your plugin has been activated) because echo (php) prints an output that does no shows coz this is a COMMENT with the sintaxis of HTML a language to PRINT AN OUTPUT to the user.
Hope it helps, and keep trying all days!