Sunday 15 January 2012

add filter - wordpress add_filer to the_content -


I have the following filter to add a function to the content posted to:

  Function hook_shreckshare ($ content) {if (is_single ()) {$ content. = Get_social_share (); Return $ content; }} Add_filter ('the_content', 'hook_shrinkshare', '100');   

I think the above original post content has to be added below. For some reason it is adding up.

Can anyone tell me in the right direction?

The $ content is passed to clear / empty the function ? Try it out:

  add_filter ('the_content', 'hook_shrinkshare', '100', 1);   

From this, the filter realizes that the function takes an argument.

No comments:

Post a Comment