Jump to content


Photo
- - - - -
Open

<script> As Allowed Tags In Excerpt Doesn't Work



This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1 zouleo

zouleo

    Super Member

  • Members
  • 165 posts

Posted 06 November 2012 - 08:20 AM

I'm trying to put an adsense ad in an excerpt. I've added <script> as an allowed tag in the Pagelines settings. But it is removed anyway. What could be wrong? I'm not using any plugin that could interfere. And other text in excerpt is not removed.

#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 17653 posts

Posted 06 November 2012 - 09:06 AM

Hi,

I have to be honest and say that I have never tried to add javascript to an excerpt that way before. However, without evening trying, I don't think it would work, as javascript isn't HTML.

I would recommend you use a hook, to add your adsense to excerpts.

#3 zouleo

zouleo

    Super Member

  • Members
  • 165 posts

Posted 06 November 2012 - 10:18 AM

I'm already adding the adsense code using a hook.

Please Login or Register to see this Hidden Content


But the adsense code always is removed. Why?

#4 Jenny

Jenny

    Advocate

  • Unicorn Store Dev

  • 2924 posts

Posted 06 November 2012 - 06:24 PM

You can also try using a plugin from wordpress. Several of them have options to add ad units to excerpts. Ad Injection I think is one of them.

#5 zouleo

zouleo

    Super Member

  • Members
  • 165 posts

Posted 07 November 2012 - 12:50 PM

Yes. But the problem seems to be in PageLines...

#6 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts

Posted 07 November 2012 - 02:25 PM

You need to use an action not a filter.
pagelines_loop_after_excerpt

Please Login or Register to see this Hidden Content