WordPress.org

Forums

Auto Affiliate Links
[resolved] Heading exclude (9 posts)

  1. Xavier24
    Member
    Posted 1 year ago #

    Hi,
    is there a way to exclude linking to headings <h1><h2><h3>?

  2. thedark
    Member
    Plugin Author

    Posted 1 year ago #

    Hello.

    Usually, the replacement engine should exclude words inside html tags ( except <p> tag ). Can I have a link to an example where the links are placed on words inside h tags ?

  3. Xavier24
    Member
    Posted 1 year ago #

    Here's the link http://www.kulturysta.com/kreatyna-zyciu-kulturysty/ the first word of the second paragraph, text "kreatyna" next to the icon with the number 2.

    Code from post editor:
    <h3><img class="alignnone size-full wp-image-574" style="border: 0px !important;" alt="2" src="http://www.kulturysta.com/wp-content/uploads/2013/12/2.png" width="30" height="30" align="middle" />Kreatyna a przyrost wagi i wydalanie jej z moczem</h3>

    Code from page source:
    <h3><img class="alignnone size-full wp-image-574" style="border: 0px !important;" alt="2" src="http://www.kulturysta.com/wp-content/uploads/2013/12/2.png" width="30" height="30" align="middle"><a title="Kreatyna" class="aal" target="_blank" href="http://www.kulturystyka.sklep.pl/cat/1015/s_available/on/Kreatyna/">Kreatyna</a> a przyrost wagi i wydalanie jej z moczem</h3>

  4. thedark
    Member
    Plugin Author

    Posted 1 year ago #

    Thank you for reporting this. I will look into this issue and I will give it a fix. Will let you know when it is ready and tested so you can update.

  5. thedark
    Member
    Plugin Author

    Posted 1 year ago #

    Hello.

    I have made a fix for your issue. Links should not appear inside h tags in content. Please update to the latest version 3.10.9 and let me know if it works well for you right now.

  6. Xavier24
    Member
    Posted 1 year ago #

    Hi
    Now seems work, thank u : )

  7. thedark
    Member
    Plugin Author

    Posted 1 year ago #

    Thank you for providing feedback.

  8. EliteHR
    Member
    Posted 5 months ago #

    Is their a quick change i can make so content within <h2> tags are updated with the links

  9. thedark
    Member
    Plugin Author

    Posted 5 months ago #

    Hello.

    On aal_engine.php , on line 99:

    $reg = '/(?!(?:[^<\[]+[>\]]|[^>\]]+<\/a>))(?!(?:[^<\[]+[>\]]|[^>\]]+<\/h.>))\b($name)\b/ims'. $langsupport .'U';

    Change it to:

    $reg = '/(?!(?:[^<\[]+[>\]]|[^>\]]+<\/a>))(?!(?:[^<\[]+[>\]]|[^>\]]))\b($name)\b/ims'. $langsupport .'U';

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic