• Hi I am trying to inset a map in to the following author box code, just before the <div class=”guerrillasocial”>

    /* This code adds the author box to the end of your single posts */
    add_filter ('the_content', 'guerrilla_add_post_content', 0);
    function guerrilla_add_post_content($content) {
    	if (is_single()) {
    		$content .= '
    			<div class="guerrillawrap">
    			<div class="guerrillagravatar">
    				'. get_avatar( get_avatar(), '80' ) .'
    			</div>
    			<div class="guerrillatext">
    				<h4>Author: <span>'. get_the_author_link('display_name',get_query_var('author') ) .'</span></h4>'. get_the_author_meta('description',get_query_var('author') ) .'
    
    		';
    
       		$content .= '
    
    			<div class="guerrillasocial">
    			';
    			if( get_the_author_meta('twitter',get_query_var('author') ) )
    				$content .= '<a href="' . esc_url( get_the_author_meta( 'twitter' ) ) . '" target="_blank"><i class="fa fa-twitter-square"></i> Twitter</a> ';
    			if( get_the_author_meta('facebook',get_query_var('author') ) )
    				$content .= '<a href="' . esc_url( get_the_author_meta( 'facebook' ) ) . '" target="_blank"><i class="fa fa-facebook-official"></i> Facebook</a> ';
    			if( get_the_author_meta('google',get_query_var('author') ) )
    				$content .= '<a href="' . esc_url( get_the_author_meta( 'google' ) ) . '" target="_blank"><i class="fa fa-google-plus-square"></i> Google+</a> ';
    			if( get_the_author_meta('user_url',get_query_var('author') ) )
    				$content .= '<a href="' . esc_url( get_the_author_meta( 'user_url' ) ) . '" target="_blank"><i class="fa fa-home"></i> Website</a> ';
    			if( get_the_author_meta('dribbble',get_query_var('author') ) )
    				$content .= '<a href="' . esc_url( get_the_author_meta( 'dribbble' ) ) . '" target="_blank"><i class="fa fa-dribbble"></i> Dribbble</a> ';
    			if( get_the_author_meta('github',get_query_var('author') ) )
    				$content .= '<a href="' . esc_url( get_the_author_meta( 'github' ) ) . '" target="_blank"><i class="fa fa-github"></i> Github</a>';
    		$content .= '
    			</div>
    			</div>
                </div>
    			';
    	}
    	return $content;

    This is the code is used to use to do the same thing, but its not working within code above. If anyone could help it would be really appreciated.

    </div><!--#profile-link-->
    <?php } ?> 
    
    <?php if ( is_single() ) {
    	$post = get_queried_object();
    	query_posts( 'posts_per_page=-1&author=' . $post->post_author );
    	echo GeoMashup::map( 'map_content=contextual' );
    	wp_reset_query();
    	}
    ?> 
    
    <?php if ( is_archive() ) {
    	echo GeoMashup::map( 'map_content=contextual' );
    	}
    ?> 
    
    </div>
    <div class="fix"></div>
    </div>

    https://wordpress.org/plugins/geo-mashup/

The topic ‘Inseting Map in Author box’ is closed to new replies.