Add single staff shortcode and widget
This commit is contained in:
25
includes/shortcodes/class-sp-shortcode-staff.php
Normal file
25
includes/shortcodes/class-sp-shortcode-staff.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Staff Shortcode
|
||||
*
|
||||
* @author ThemeBoy
|
||||
* @category Shortcodes
|
||||
* @package SportsPress/Shortcodes/Staff
|
||||
* @version 1.4.7
|
||||
*/
|
||||
class SP_Shortcode_Staff {
|
||||
|
||||
/**
|
||||
* Output the staff shortcode.
|
||||
*
|
||||
* @param array $atts
|
||||
*/
|
||||
public static function output( $atts ) {
|
||||
|
||||
if ( ! isset( $atts['id'] ) && isset( $atts[0] ) && is_numeric( $atts[0] ) )
|
||||
$atts['id'] = $atts[0];
|
||||
|
||||
sp_get_template( 'staff-photo.php', $atts );
|
||||
sp_get_template( 'staff-details.php', $atts );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user