formating link source (3 posts)

  1. astone9
    Posted 5 years ago #

    Thank you for this wonderful plugin, it works great however i need a costum feature that im tring to make for 2 days but i cant :(. I apriciate very much any help by your side.

    I want to format the Source Url, i have to strip a string from the URL/Permalink. I did a code to do that. However i dont know where to put it. All i have to do is to edit the wpematico function that sets the permalink.

    here is my code
    $dirty_url = "http://xxx.com/article.php?ref=rss&id=xxxxxx";
    // i have to remove the ref=rss& from the URL so i did so
    $dirty_url = str_replace('ref=rss&','', $dirty_url);
    echo $dirty_url;

    This code works great however im unable to edit the permalink. Can you please help me. Thank you in advance

  2. astone9
    Posted 5 years ago #

    I did a little research and im unablt to use str_replace because the_permalink() prints the output therefore i can not edit it with str_replace.

    <a href="<?php str_replace(".com/", ".com/game-", the_permalink()) ?>">link</a>

    please help me

  3. MyShadowSelf
    Posted 5 years ago #

    I "believe" you could do this without editing any source code at all.

    Login, got to WPeMatico -> 'your campaign'

    At the very bottom of the form you'll find "Rewrite Option"

    in the textarea headed "Origin" enter: ref=rss&
    Leave the "Rewrite to" textarea empty, but check the checkbox.

    Hopefully, that will do what you want it to do, but I can't guarantee. I haven't tried it.

    Good luck

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WPeMatico
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic