Support » Plugin: MailPress » How to remove links from the post content?

  • Hello,
    I would like to have no URLs in the content of the posts that are sent by mail (the text would remain as it is but without linking to another page). How do I do that?

    Thank you.

    P.S. this is by far the best newsletter plugin I’ve seen, so thank you for this too !

Viewing 2 replies - 1 through 2 (of 2 total)
  • @iul,
    Tee link is built in the _loop.php file of the theme, inside the <h2> div.

    <a href="<?php the_permalink(); ?>" title="<?php printf( __('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ); ?>" rel="bookmark"  <?php $this->classes('nopmb entry-title_a'); ?>>
    <?php $this->the_title(); ?>

    into :

    <?php $this->the_title(); ?>

    Note : you should do this in a custom theme to avoid losing your modifications by next plugin update.

    [Edit] OUps, I guess it’s NOT your question… I leave it anyway, it might help someone else…


    Maybe have a look at PHP strip_tags, where you must then declare which tags are NOT to be stripped… can be laborious …

    Also seen :

    $link = str_replace("<a href=\"","",$your_link);
    $link = ereg_replace("\">()</a>","",$link);

    But it will strongly depend on other attributes : title, target, rel, style, …

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to remove links from the post content?’ is closed to new replies.