Add table heading option to widgets

This commit is contained in:
Brian Miyaji
2015-07-17 15:32:29 +10:00
parent f3c6a6878b
commit f7742a69cd
18 changed files with 162 additions and 53 deletions

View File

@@ -2,7 +2,7 @@
class SP_Widget_Staff extends WP_Widget {
function __construct() {
$widget_ops = array('classname' => 'widget_staff widget_sp_staff', 'description' => __( 'Display a single staff member.', 'sportspress' ) );
$widget_ops = array('classname' => 'widget_sportspress widget_staff widget_sp_staff', 'description' => __( 'Display a single staff member.', 'sportspress' ) );
parent::__construct('sportspress-staff', __( 'Staff', 'sportspress' ), $widget_ops);
}
@@ -20,6 +20,8 @@ class SP_Widget_Staff extends WP_Widget {
// Action to hook into
do_action( 'sportspress_before_widget_template', $args, $instance, 'staff' );
echo '<h4 class="sp-table-caption">' . get_the_title( $id ) . '</h4>';
sp_get_template( 'staff-photo.php', array( 'id' => $id ) );
sp_get_template( 'staff-details.php', array( 'id' => $id ) );