skip to Main Content

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…

2

Answers


  1. 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 -->
    
    Login or Signup to reply.
  2. 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!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search