• 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.

Viewing 11 replies - 1 through 11 (of 11 total)
  • 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)

    Thread Starter Kevin Shenk

    (@batonac)

    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^="https://"]),
      /* domains to exclude */
      [href*="https://stackoverflow.com"],
      /* subdomains to exclude */
      [href*="https://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”

    Thread Starter Kevin Shenk

    (@batonac)

    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.

    Thread Starter Kevin Shenk

    (@batonac)

    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.

    Thread Starter Kevin Shenk

    (@batonac)

    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.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Feature Request: Exclusions’ is closed to new replies.