I am trying to: I've created an ad using Advanced Ad's plugin with the script pasted below and assigned it to appear after the 7th para on Custom Posts Article.. The <a> part renders fine but while i've use the same short code within the <script> tag in the code it doesn't seem to work.. I had created a ticket for this but the support didn't seem to understand it and hence this bug ticket
ParfumPlus Arabia
<script async defer src="[types field='flipbook-url' item='@issue-article.parent' output='raw'][/types]html/static/embed.js?uni=5c68db31edf1cd823e4cc281e33de80d"></script>
Link to a page where the issue can be seen: versteckter Link (What you can see after the 4th para is a working ad but what you see after the 7th para is the buggy one..
Here's a link to the earlier support ticket where the supporter created a completely different scenario ... https://toolset.com/forums/topic/types-field-inside-a-script-for-advanced-ads/
I've connected with Advanced Ads team too and they mentioned it's not a big from their side.. and they'd be happy to help if required
I expected to see: The flipbook view that the <script> tag is supposed to display
Instead, I got: Just what appears in the <a> tag.. the text 'ParfumPlus Arabia' with the link.
Hello,
I have tried the codes as you mentioned above in my localhost:
<script async defer src="[types field='flipbook-url' item='@issue-article.parent' output='raw'][/types]html/static/embed.js?uni=5c68db31edf1cd823e4cc281e33de80d"></script>
It works fine, if you are using Blocks Editor, I suggest you put above codes into a shortcode block and test again, see WP document:
https://wordpress.org/support/article/shortcode-block/
Hi Luo Yang
As you are accessing the site for the other ticket could you please check for this issue to?
The Ad In Advanced Ads is here..
versteckter Link
(screenshot attached that shows the working ad and the non-working ad)
Both these ads appear here..
versteckter Link
The working ad is the image (after the 4th Para) and the non-working ad is the text 'ParfumPlus Arabia' after the 7th Para..
Regards,
Alim
It seems that the problem is in plugin "Advanced Ads", it does not support using types shortcode within script tag, I have done below modifications in your website:
Edit ad: PP Flipbook Feeds Not Working
versteckter Link
1) Change the codes with PHP codes:
<script async defer src="<?php echo do_shortcode("[types field='flipbook-url' item='@issue-article.parent' output='raw'][/types]");?>html/static/embed.js?uni=5c68db31edf1cd823e4cc281e33de80d"></script>
2) Enable option:
Allow PHP
Test it in front-end, it works fine:
versteckter Link
More help:
https://developer.wordpress.org/reference/functions/do_shortcode/
Hi Luo Yang
The link doesn't seem to work on the front end.. please check screenshot .. there's an error message on the ads view...
Is it the two opening quotes that are clashing... before the php code opening and the types opening?
<script async defer src="<?php echo do_shortcode("[types
Please advise..
Regards,
Alim
It does work in front-end, please check the source codes of below URL:
view-source:versteckter Link
Line 842:
<script async defer src="<em><u>versteckter Link</u></em>"></script></div>
Can you confirm it?
And for "the error message on the ads view" you mentioned above, it is a problem of your plugin "Advanced Ads", you will need to check the "Advanced Ads" plugin author for it.
Those error message don't take effect on front-end, and the PHP codes is correct.
My issue is resolved now. Thank you!
Thanks Luo Yang... Yes you are right.. it's showing fine..:-)..
I'll follow up with the Advanced Ads team for the rest.
Have a nice day..:-)..
Regards,
Alim