How to add a filter / xtra content to a post (3 posts)

    Posted 9 years ago #

    Im trying to add some random predefined tags to my posts - but i cant figure out where the post(content) is getting saved - i thought i could just add a php funtion there -

    and have the output of that function saved together with the post ...

  2. Write a tiny plugin using the WordPress hook "publish_post" to modify the post contents before it's inserted into the database.

    See these two links for more information:


    Posted 9 years ago #

    Ehmm - well well im not a hardcore coder - could i get a few more hints ...

    I use the Randomize plugin to generate some content ..

    could i just call the funtion from somewhere ??

    Also I use the SH-autolink ... but it only links conten published from the admin not from wordpress feeds

    so can i like add an action or a filter anywhere ??
    like this?

    add_action ('publish_post', 'randomize()')

    could i change the_content here to publish_post to get all content autolinked ??

    add_action ('admin_menu', 'shautolink_add_adminpage');
    add_filter('the_content', 'shautolink', 1);
    add_filter('comment_text', 'shautolink', 1);

    Sorry but im not that good at php ...

Topic Closed

This topic has been closed to new replies.

About this Topic