Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #554625

    Hello!

    The Amazon iframes in my Code Blocks are not displayed.
    http://marcus-auer.at/cms/ssd-pro/

    <iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="//ws-eu.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=DE&source=ac&ref=qf_sp_asin_til&ad_type=product_link&tracking_id=memaad-21&marketplace=amazon&region=DE&placement=B00LMXBOP4&asins=B00LMXBOP4&linkId=&show_border=true&link_opens_in_new_window=true">
    </iframe>

    What I find is: after saving there are changes in the inserted iframe-code – but I can’t find the issue und I am not able to fix this problem.
    I insert: amazon&region // and after saving it is: amazon®ion

    Thx for your Help!

    • This topic was modified 9 years ago by studio-2.
    #556953

    Hey Marcus!

    Try creating a custom shortcode for your amazon link, you can do that by placing a code like this in your theme / child theme functions.php:

    function custom_shortcode_func() {
    	ob_start();
    	?>
    		PUT YOUR CODE HERE
    	<?php
    
    	$output = ob_get_clean();
        return $output;
    }
    add_shortcode('my_shortcode', 'custom_shortcode_func');
    

    Then in the codeblock:

    [my_shortcode]
    

    Best regards,
    Josue

    • This reply was modified 9 years ago by Josue.
    #593969

    Hi,
    I have exactly the same problem with the affiliate amazon code.
    Each time I update the post or the page or the portfolio item, “amazon&region” change to “amazon®ion”
    But in my site, i want to have a lot of differents affiliate amazon code, so is there an anather solution more simple than create a function for each affiliate code ?

    Thanks

    #593982

    Hi!

    Does not seem so,. The Fucking is an easy way to do it fast and with no problems.
    Give it a try and if you have fail, we will help you further with it

    Cheers!
    Basilis

    #594178

    Hi, Basilis,
    I don’t understand what you mean.
    I have to try what ?
    For the moment, every time I update the sigles portfolio items, I copy again the amazon iframe code.
    Sorry about my english.
    Thanks

    #594637

    Hi!

    You could create a shortcode with parameters, that way you could define the region each time you put the shortcode.

    Regards,
    Josue

    #594920

    Hi Josue,
    The region is always the same (FR) I think
    Here is an example of the affiliate code in the private content.

    Thanks

    #594935

    Using a shortcode (or multiple ones) would be the ideal solution, there’s no other way (as far as i know) to protect a code from being modified by WordPress / Enfold automatic filters.

    #595378

    Hi Josue,
    As I do not control enough coding, I will continue to update the amazon affiliate code each time I update the post / page / portfolio item.
    Thanks anyway for the answer.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Use Code Block – Amazon Link is not displayed’ is closed to new replies.