diff --git a/functions.php b/functions.php index d69c2d9..7ea796d 100644 --- a/functions.php +++ b/functions.php @@ -263,78 +263,4 @@ function uc_redirect_403() { } add_action( 'template_redirect', 'uc_redirect_403' ); - - -//==================================================== -// WordPress Link Guessing Option adds a checkbox -// to the Settings page -//==================================================== - -add_action( 'admin_init', 'link_guessing_settings_init' ); - -//==================================================== -// Link Guessing - ON or OFF ? -//==================================================== - -add_action( 'wp_loaded', function () -{ - $checked = get_option( 'link_guessing' ); - if ( empty( $checked ) ){ - remove_filter('template_redirect', 'redirect_canonical'); - }else{ - add_filter('template_redirect', 'redirect_canonical'); - } -}); - -//==================================================== -// Link Guessing init -//==================================================== - -function link_guessing_settings_init(){ - - /* Register Settings */ - register_setting( - 'general', // Options group - 'link_guessing', // Option name/database - 'link_guessing_sanitize' // sanitize callback function - ); - - /* Create settings section */ - add_settings_section( - 'link_guessing_section_id', // Section ID - '', // Section title - leave it blank - null, // Section description callback function - we don't need it - 'general' // Settings page slug - ); - - /* Create settings field */ - add_settings_field( - 'link_guessing_field_id', // Field ID - 'Link Guessing', // Field title - 'link_guessing_field_callback', // Field callback function - 'general', // Settings page slug - 'link_guessing_section_id' // Section ID - ); -} - - //==================================================== -/* Sanitize Callback Function */ -//==================================================== - -function link_guessing_sanitize( $input ){ - return isset( $input ) ? true : false; -} - - //==================================================== -/* Settings Field Callback */ -//==================================================== - -function link_guessing_field_callback(){ - ?> - - \ No newline at end of file +?> \ No newline at end of file diff --git a/inc/people-grid.php b/inc/people-grid.php new file mode 100644 index 0000000..3b0ae02 --- /dev/null +++ b/inc/people-grid.php @@ -0,0 +1,154 @@ +have_posts() ) { ?> +
';
+ $titlePieces = explode(";", get_field('title'));
+ foreach( $titlePieces as $t ){
+ echo ( !empty($t) ? "{$t}
": "" );
+ }
+ echo '
';
+ $departmentPieces = explode(";", get_field('department'));
+ foreach( $departmentPieces as $d ){
+ echo ( !empty($d) ? "{$d}
": "" );
+ }
+ echo '
'; + echo ''.$file['title'].''; + echo '
'; + } + }; + if (in_array('email', $information_to_display)) { + echo ''; + echo ''.get_field('email').''; + echo '
'; + }; + if (in_array('phone', $information_to_display)) { + echo ''; + the_field('phone'); + echo '
'; + }; + if (in_array('phone_(alternate)', $information_to_display)) { + echo ''; + the_field('phone_(alternate)'); + echo '
'; + }; + if (in_array('fax', $information_to_display)) { + echo ''; + the_field('fax'); + echo '
'; + }; + if (in_array('mailing_address', $information_to_display)) { + echo '';
+ echo str_replace(';','
',get_field('mailing_address'));
+ echo '
'; + the_field('office_location'); + echo '
'; + }; + if (in_array('campus', $information_to_display)) { + echo ''; + the_field('campus'); + echo '
'; + }; + if (in_array('office_hours', $information_to_display)) { + echo ''; + the_field('office_hours'); + echo '
'; + }; + if (in_array('courses', $information_to_display)) { + echo ''; + the_field('courses'); + echo '
'; + }; + if (in_array('url', $information_to_display)) { + echo ''; + }; ?> +