skepticp
Forum Replies Created
-
I got it to work! I had pasted the code in CSS instead of Javascript. Thank you!
Hi,
I’m not a javascript expert, but I took a shot and it isn’t yet working. Do you want to check it out? I have the banner set to display on some pages and not others. But this page should work as a test:
https://www.skepticspath.org/blog/
Here’s the code:
jQuery(document).ready(function ($) {
const random = Math.ceil(Math.random() * 2);
const banner_id = random === 1 ? '' :_${random}
;
const elementId =simple-banner${banner_id}
;
const element = document.getElementById(elementId);
if (element) {
element.style.display = 'block';
}
});I tried these variations with no luck. It seems like something is unique about the “courses” page. Let me know when you have time and maybe you can troubleshoot. My guess is other people may be having the same problem with Learndash!
Yes, I think something must be a little strange about the course pages compared to the others, which all work properly with your banner. Let me know if you’d like to investigate in my admin panels. Other people running LearnDash may be having similar problems.
Thank you for responding so quickly. I fixed that error but the problem persists.
Hi, I’m still struggling with this problem. I’ll attach a couple of screenshots. My main problem is that the banner displays on the courses pages, despite the checkmark for that type of page selected under “Disabled Pages.”
This is an example of a page that should not display a banner:
https://www.skepticspath.org/courses/spte-9-meditations/
I also tried adding a javascript hook to hide pages with “courses” in the URL with an Astra hook, but that did not work either:
I’m happy to give you access to the site if you want to try and debug. It seems like many people using Learndash might have similar problems.
Hi there, I disabled all the javascript cacheing of WP rocket but the simple banner still shows on the course pages despite the course pages being checked as excluded in your plugin. Any thoughts? It is hidden on other pages I have checked.
Amazing, it worked. Thank you!!
Thank you so much! I did as you said and also cleared my cache and tested in an incognito window. The problem does seem to persist if you want to take a look. I really appreciate your help, and I’m also a (small) donor to your great project.
Thank you for answering so quickly! I tried but the problem persists!
Thanks a lot! I’m still a pro subscriber and just updated. One question for you that I’ve had for a while. I saw that WordPress now has some native font optimization tools. Do these interfere with OMGF or are they just as good, etc.? I’ve been going on the assumption OMGF Pro is still a superior solution.
Sure
MacBook Pro (15-inch, 2018)
Radeon Pro 560X 4 GB
Intel UHD Graphics 630 1536 MBFor me this is broken on Chrome MacOS and also Safari MacOS. Fine on mobile. Thanks for your efforts to resolve!
Forum: Plugins
In reply to: [Events Shortcodes For The Events Calendar] Hide default archive pageI did find a way to make it invisible in search engines with the Yoast plugin under search appearance: “Settings for Events archive“
That’s great news, Daan. Thank you!
- This reply was modified 4 years, 5 months ago by skepticp.