I'm looking for a plugin that will allow users to put

I'm looking for a plugin that will allow users to put arbitrary content at the bottom of every post (NOT every single page + post, just every post).

If there was a plugin that created another widget area for the bottom of a post before the discussion area that would work, or just a text field where you could put in arbitrary HTML / short codes to be rendered out above the discussion would be fine as well.

Is there anything out there that does this?

  • Vaughan
    • Support/SLS MockingJay

    Hi @mbianco,

    This isn't exactly a plugin. but should do the job.

    Add the following to your theme functions.php

    function add_after_post_content($content) {
    	if(!is_feed() && !is_home() && is_singular() && is_main_query()) {
    		$content .= '<p>Content that is added after the post content.</p>';
    	}
    	return $content;
    }
    add_filter('the_content', 'add_after_post_content');

    If you want to use a shortcode replace the following line

    $content .= '<p>Content that is added after the post content.</p>';

    With

    $content .= '<div class="custom-post-content"><?php echo do_shortcode('[YOURSHORTCODE]'); ?></div>';

    I used a div, so you could style it better with CSS.

    Hope this helps

  • Jack Kitterhing
    • Code Norris

    Hi there @mbianco,

    Hope you're well today and thanks for your question.

    You should never allow PHP or any code to be edited via the admin area, it is extremely unsafe, one mistake and the site goes down.

    As you said non-devs? Did you mean something more like one of those simple custom css plugins but just for PHP/jQuery? :slight_smile:

    Thanks!

    Kind Regards
    Jack.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.