2

i want to make a wordpress plugin that will display some content at the end of each post. let's say for example 'Hello world'. But looking at the wordpress API, i don't find any relevant indications about how to do this.

i don't want a widget, but only a plugin that does only that: displays me a static text at the end of every article.

any idea about how this should be done?

thanks!

1 Answer 1

1

See if this forum post helps you: http://wordpress.org/support/topic/simple-wordpress-plugin-to-add-actionable-text-after-blog-content-feedback?replies=1

The lines doing the magic are:

...
add_filter('the_content','now_what_pjrvs');
...
function now_what_pjrvs($content = '') {
       return $content . $text;
}

Where $text is the code that you want to add at the end of the post content.

Hope it helps. Tell me if you need more references.

Sign up to request clarification or add additional context in comments.

2 Comments

@dana: I edited the answer with the exact line of codes that you have to use.
doesn't work - doesn;t add me any data in my post. i am using wordpress 3.2.1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.