Using scripts in the topic

How can i implement the use of javascript in topics?

In a theme component.

But if you want users to be able to put javascript in topics, it’s a bad idea and you can.

Can you say more about what it is you’re trying to accomplish?

1 Like

I want to add javascript code to specific topics.
This code calls an ad unit from the ad network I’m working with.
Therefore, it is necessary to install it in specific places, and not just through a component, since there the choice is only between Body and Footer.

I tried using House Ads from the advertising plugin, but it doesn’t support JS

Look at the topics about how to develop themes. Also check out the Plugin outlet locations theme component to see where you can insert stuff.

2 Likes

Looks interesting, but my knowledge is not enough to understand how to use it :sweat_smile:

Can you tell me how to insert the necessary code here?

Maybe this will help: Add custom content that only appears on your homepage

But you’ll need to have a look at the theme development tutorial.

3 Likes

It’s too difficult for me. Looks like we’ll have to put this off for later for now. :smiling_face_with_tear:

1 Like