Presently I am creating a gallery wordpress plugin for Wordpress, and I must give my customers the choice to find the gallery's position (before or following thecontent material).

Presently, I've been successful to place it following the content, by connecting in to thecontent material such as this:

function add_post_content($content) {

    if ( 'gallery' == get_post_type() && is_single() ) {

        $content .= gallery_frontend();
        $content .= gallery_map_display();


    if ( 'gallery' == get_post_type() && is_archive() ) {

        // archive functions here    


    return $content;


add_filter('the_content', 'add_post_content');

Can there be any method of getting it to show prior to thecontent material instead of after?

Would you not only concatenate within the other way?

$content = gallery_frontend() . gallery_map_display() . $content;

I don't know what your functions do, but when they simply return string data than the should work fine.