Adding phplugin doesn't work

Hi
I inserted a function in a new php File, turned the phplugin at every Pagetemplate on. But it doesn’t work.

The function (for a test):

function main_top () {
	echo 'das ist ein Test';
return false;
}

the text should appear at the website (eventually only visible in the source), but id doesn’t

Cane someone help me please?
Thanks
Thomas

Is this code all by itself in a .php file?
If so, you need to start with the phplugins-pangolin-sample.php file and add your code to the user area.
You can download the file from your site in the /backlight/modules/custom-resources/phplugins/ file. After editing, upload to the /backlight/custom/phplugins/ folder.

Can you post a link to a page where it’s not working?

For reference, here is the link to the documentation: https://backlight.me/docs/using-phplugins

Hi Daniel
I already followed this instructions as good as i can…

I copied the file phplugins-pangolin-sample.php and added the function as decribed.
then I activated the phplugin at every pagetemplate and choosed the new php File.
I deleted the comment area for better readability. Could this be the reason?

if the example works, i will add a matomo tracking script at the head-section…

the link is:

If you delete the wrong thing in that file, things might not work as expected. There is code at the beginning that is required.

My guess is that when you deleted commented content you may have also deleted lines 10-24 (or maybe even the opening php tag), which contain the code required to make it all work. Or, because of other deletions in the file, the same code may be commented out.

Can you copy and paste the content of the file here?

I already followed this instructions as good as i can…

As mentioned, I added the documentation as a reference. Mainly for someone else finding this thread and missing the documentation.

Hi Rod
Sorry for the delayed answer. I did all right except…I copied the wrong samplefile. palmface

Now the code works as excepted

Thanks for your Input.

Thomas