1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Wordpress Help

Discussion in 'Blogging' started by gpgip, May 20, 2010.

  1. gpgip

    gpgip Junior Member

    Joined:
    Jun 25, 2009
    Messages:
    182
    Likes Received:
    89
    Hey i have 149 post on my blog and i want to add something to each of the post at the sametime, ive looked around but i cant find out how, can someone tell me what to do or if there is a plugin that i need to download to do this...?

    thanks in advance...
     
  2. xhpdx

    xhpdx Regular Member

    Joined:
    Sep 21, 2008
    Messages:
    331
    Likes Received:
    2,160
    Occupation:
    Coder
    Location:
    EU
    you want to add something at the beginning or the end of each post?
     
  3. gpgip

    gpgip Junior Member

    Joined:
    Jun 25, 2009
    Messages:
    182
    Likes Received:
    89

    yes well i just have a download link i want to add to all the post at the same time
     
  4. xhpdx

    xhpdx Regular Member

    Joined:
    Sep 21, 2008
    Messages:
    331
    Likes Received:
    2,160
    Occupation:
    Coder
    Location:
    EU
    Add this code to your theme functions.php

    PHP:
    function bottom_of_post($content) {
    $content.= "<a href=\"http://thelink.com\">link title</a>\n";
    return 
    $content;
    }
    add_filter('the_content','bottom_of_post');  
     
  5. gpgip

    gpgip Junior Member

    Joined:
    Jun 25, 2009
    Messages:
    182
    Likes Received:
    89
    thanks