Greetings. Great plugin, very happy I purchased, looking forward to upcoming releases as I’ve heard of some great new features.
I am working with a script that I need to run only on the homepage. I have found the code for a function code to only run on single pages, but is there a way to load a javascript code only on a single page? Thanks.
The page I need help with: [log in to see the link]
Not so far, I know the folks at code snippets are very busy right now, but I’m hoping one of them will jump on here and let me know if it’s going to be a feature, and if there’s some sort of method I can use for this purpose.
This is definitely planned for a future release. For the meantime, you can always write your CSS/JS code from within a PHP snippet and use conditional tags to determine when and where it is included on the page.
Your link shows the php for including something, but this is a script. So I see a couple of ways to do it, either put the script right into a php snippet, or, write a php snippet that calls the script snippet. What do you recommend is the easiest way to accomplish this.
Excited about your upcoming releases!
This reply was modified 2 years, 9 months ago by lowthian.
Hi Shea, thanks for your update. I guess what would be really nice to see in a future release is something similar to what Elementor has for custom code where you can decide where you want it to run. If that is not doable, then how about a way to enter the post id(s) on the snippets?