Page 1 of 1

I can't put javascript code (advertising and markup Schema.org)

Posted: Tue Jan 04, 2022 8:13 am
by Jekky
I can't put javascript code (advertising and markup Schema.org) in the html code of the entry. :shock:

Re: I can't put javascript code (advertising and markup Schema.org)

Posted: Tue Jan 04, 2022 1:49 pm
by onli
What exactly happens when you try? This is definitely possible in general.

Re: I can't put javascript code (advertising and markup Schema.org)

Posted: Tue Jan 04, 2022 4:30 pm
by Jekky
When I put schema.org (markup), then everything related to the "meta" tags in the micro markup code breaks, that is, they simply disappear later. It was about Schema micro-markup. And Google Adsense advertising, the script, gets up incorrectly and I have already received a ban from Google for breaking the ad block code. Now I have removed the WYSIWYG editor and the micro markup is fine. But I can't put the scripts of the ad blocks yet.

Re: I can't put javascript code (advertising and markup Schema.org)

Posted: Tue Jan 04, 2022 6:47 pm
by onli
Does the Javacript code maybe get distorted by a markup plugin? Have a look at the source code of the article where you paste the code in, maybe this gets clearer that way. You can also post or link it here.

Also, does the code really belongs into the article itself? You could add it to your whole site with a htmlnugget plugin.

https://github.com/onli/serendipity_event_schema is a plugin I built that adds some schema markup automatically. Not sure whether it does exactly what you need, but maybe it's of help.

Re: I can't put javascript code (advertising and markup Schema.org)

Posted: Wed Jan 05, 2022 9:10 am
by Jekky
Super!! Fine plugin!! Thank Youuuuuuuuu!
Checking the rich results says there are no errors, only 1 warning.

Your plugin
"author": {
"@type": "Person",
"name": "Name Author",
},
Google ask url of author

"author": {
"@type": "Person",
"name": "Name Author",
"url": "https://site-author.com"
},

Re: I can't put javascript code (advertising and markup Schema.org)

Posted: Wed Jan 05, 2022 3:52 pm
by onli
Great that you like it :)

Quite possible that the url is missing, but what should the plugin link to there? Not every author has a page. Or should it link to the author's author page in the s9y blog?

Have a look at the source code of the plugin if you want to extend it for you, it should be reasonable easy to read. That way you can add the url if you want.

Re: I can't put javascript code (advertising and markup Schema.org)

Posted: Wed Jan 05, 2022 9:16 pm
by Jekky
Already added:-) Thank you for your work!! I can't believe you're doing all this for free. You are great fellows!! Super! Thanks!