Feature Request: Exclusions
-
I have some links, such as lightbox triggers, that should be excluded from this plugin, as it breaks the existing code. Please add a class-based exclusion system.
-
its easier than you think. Just use CSS class name targeting like:
a:not(.lightbox-class)for more targets to exclude:
a:not(.class-1):not(.class-2)Woot! I’ll give this a try and report back!
CSS targeting today can be even more complex – eg. to grab all external and hash links:
a[href]:not(:where( /* exclude hash only links */ [href^="#"], /* exclude relative but not double slash only links */ [href^="/"]:not([href^="//"]), /* domains to exclude */ [href*="//stackoverflow.com"], /* subdomains to exclude */ [href*="//meta.stackoverflow.com"], )):after { content: 'βοΈ'; }Source: https://stackoverflow.com/questions/5379752/css-style-external-links#answer-5379820
More above my start point is
a:not(.ab-item)– just because sometimes edit button from admin bar making the mess.
ProTip: if You want to have correct edit links for pages, posts, categories etc. in “General Settings” add “Extra Selector”: #wpadminbar first to replace the admin bar.I saw another support request from you – I believe you made a mistake while copy paste my solution and that’s why you have jQuery error in consol log.
Just paste what you entered in “Trigger Elements”Here’s what I entered:
a:not(.cc-lightbox)Looks okay for me. Can you provide the link to the website here? If not maybe I could help outside WordPress Support forum for this plugin, but for now it would be awesome to see the website.
Well, here’s the website, but I’ll need to spin up a staging site so I can enable this for development purposes. I just turned it on for a minute or so to verify that the issue still exists. If you’re willing to take a look at a staging site, I’ll get that set up.
Now I see….
"wp-site-blocks"means You’re using the FSE theme. Unfortunately it’s hard to make FSE theme work with Ajax Press.Most of the problems I solved in past was by make header and footer with plugin (like older hybrid themes) and output them with add_action() hook.
I tried many solutions, but there’s no easy way to AP work with FSE.Yeah, I am using FSE, with the Cwicly toolkit. Because I have full control of the template in FSE, I created an identical block ID in every template that I use for swapping out the page contents. That part worked, but some other quirks remain.
I’m glad to have clarity on this, though. I was really hopeful about AP, and hope there’s some kind of resolution to this over-arching objective in the future.
Best!
I could try to solve it, but it could be only as job offer π Just shot me an email, and we’ll take a call and see what could I do.
-
This reply was modified 3 years, 2 months ago by
Paul Bystrzan.
-
This reply was modified 3 years, 2 months ago by
The topic ‘Feature Request: Exclusions’ is closed to new replies.