I'm trying to create a Shortcode to display scores between to teams. I've got this far, but I can't seem to get variables into the damn thing. I thought the arrays where used for that, but apparently it doesn't work like that.
function get_gamecentre($atts, $content = null) {
extract(shortcode_atts(array(
"HOME-IMG" => '',
"AWAY-IMG" => '',
"HOME-NAME" => '',
"AWAY-NAME" => '',
"HOME-POINTS" => '',
"AWAY-POINTS" => '',
), $atts));
return '<div style="background-color: #360000;width: 670px; height: 250px; color: white; padding: 10px;">';
return '<table style="color: white;" width="100%">';
return '<tbody>';
return '<tr>';
return '<td style="text-align: center;" width="340"><img class="size-full wp-image-32 alignnone aligncenter" title="tribes-pp" src="'.$HOME-IMG.'" alt="" width="140" height="140" /></td>';
return '<td width="34"></td>';
return '<td width="350"><img class="alignnone size-full wp-image-32 aligncenter" src="'.$AWAY-IMG.'" alt="" width="140" height="140" /></a></td>';
return '</tr>';
return '<tr>';
return '<td style="text-align: center;">[box color=red]'.$HOME-NAME.'[/box]</td>';
return '<td style="text-align: center;">VS</td>';
return '<td style="text-align: center;">[box color=red]'.$AWAY-NAME.'[/box]</td>';
return '</tr>';
return '<tr>';
return '<td style="text-align: center;">[box color=green]'.$HOME-POINTS.'[/box]</td>';
return '<td style="text-align: center;">VS</td>';
return '<td style="text-align: center;">[box color=red]'.$AWAY-POINTS.'[/box]</td>';
return '</tr>';
return '</tbody>';
return '</table>';
}
add_shortcode("gamecentre", "get_gamecentre");