Plugin development - how to show some text after the_content (3 posts)

  1. nabtron
    Posted 6 years ago #

    i am making custom plugin for my site for wordpress and i need to show some text in the post area

    i tried using:

    add_action('the_content', 'nabexchange');

    but it replaced the content of the page. how can i make it just show the echo in nabexchange function after the post text?

  2. alieneila
    Posted 6 years ago #

    This is what I do...

    add_filter ('the_content', 'insertContent');
    function insertContent($content) {
    	$content .= 'Stuff to add after content';
    	return $content;
  3. nabtron
    Posted 6 years ago #

    thanks :) that's really what i was looking for :)

Topic Closed

This topic has been closed to new replies.

About this Topic