Quantcast
Channel: help – WordPress.org Forums
Viewing all articles
Browse latest Browse all 13924

Peacockerie on "Help with some php"

$
0
0

This is the code for my Team About page. It lets me put an image with a caption of a name and a position. What I want is for the image to be clickable to a personal profile page, but I dont know how to do that. Please help.

function team_member( $atts, $content = null  ) {
		extract( shortcode_atts( array(
		'name' => '',
		'position' => '',
		'img' => '',
	), $atts ) );
	$return = '
<li>';
	$return .= '<img class="imgWithBorder" src="'.$img.'" alt="" />';
	$return .= '<p>'.$name.' <span>'.$position.'</span></p>';
	$return .= '</li>
';		

	return $return;
}

with a shortcode that looks like this:

[team][team_member name='Michael Peacock' img='http://tdp-arch.com/wp-content/uploads/2012/11/michael1.jpg'  position='Intern Architect'][/team_member][/team]

[Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your posted code may now have been permanently damaged/corrupted by the forum's parser.]


Viewing all articles
Browse latest Browse all 13924

Trending Articles