• madebywilder

    (@madebywilder)


    I would like to use the custom HTML tool, but I only want it to be applied to the homepage (it is for a popup modal for email subscriptions).

    Is there a way to apply this or will it be added to every page?

    Not a PRO user

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author SilkyPress

    (@diana_burduja)

    Any custom code will be added to every page.

    With custom CSS or JS you can target a certain page with the actual code. So the code will be added to every page, but it will affect only some pages.

    For example, if you want to change the H1 color only on the homepage, then you can do this with .home h1 { color: red }.

    Or, if you want some JS to act only on the homepage, then if(window.location.href === "https://your-homepage-url") { // do something here; } will do.

    I don’t know what is exactly the HTML you’re trying to add, so I don’t know if there is a workaround like this for your case.

    Thread Starter madebywilder

    (@madebywilder)

    I want to add a Mailchimp subscribe pop up js code to the homepage.

    Plugin Author SilkyPress

    (@diana_burduja)

    I already gave you the general answer. Whether you work out a solution from my previous answer, or you show me the specific code you’re trying to add.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding custom to specific page only’ is closed to new replies.