• Resolved Micha – MS29

    (@fotoglut)


    Hi,

    the toppic say it all πŸ™‚
    I will add an CLASS to the Textlink (Update sure).

    See here the First Link (Bilder im Kopf) is generatet with your Plugin, the second (under the Video) is an normal Textlink.
    I have an plugin that indicates the external Links like the second one. But with your script it doenst work, so i will put the CLASS to the Link direkt.

    Thanks for your Help

    https://wordpress.org/plugins/amazon-link/

Viewing 1 replies (of 1 total)
  • Plugin Author paulstuttard

    (@paulstuttard)

    Hi,

    Try adding this code somewhere in your site (functions.php, or at the end of the plugin php file):

    function alx_extras_add_link_class ($url){
         $url = str_replace('rel=', 'class="my_class" rel=', $url);
         return $url;
      }
      add_filter( 'amazon_link_template_get_link_open',  'alx_extras_add_link_class', 22, 1 );
      add_filter( 'amazon_link_template_get_rlink_open', 'alx_extras_add_link_class', 22, 1 );
      add_filter( 'amazon_link_template_get_slink_open', 'alx_extras_add_link_class', 22, 1 );

    Change my_class to the appropriate class.

    Paul

Viewing 1 replies (of 1 total)
  • The topic ‘adding CLASS to Amazon Textlink’ is closed to new replies.