Advertisement
pjeaje

Author.php with only their CP

Apr 19th, 2016
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 21.16 KB | None | 0 0
  1. <?php
  2. /**
  3. * The template for displaying Archive pages.
  4. *
  5. * Learn more: http://codex.wordpress.org/Template_Hierarchy
  6. *
  7. * @package GeneratePress
  8. */
  9.  
  10. get_header(); ?>
  11.  
  12.  
  13.  
  14. <?php if( !is_user_logged_in()) { ?>
  15. <?php wp_redirect( 'http://sandgroper.net/' ); exit; ?>
  16. <?php } else { ?>
  17.  
  18.  
  19. <!-- redirect school/teacher if no profile -->
  20. <?php if ( 0 == count_user_posts( get_current_user_id(), "school_profile" ) && is_user_logged_in() && current_user_can('school-cap') && !current_user_can('admin-cap')) { ?>
  21. <?php wp_redirect( 'http://sandgroper.net/?page_id=242' ); exit; ?>
  22. <?php } elseif  ( 1 == count_user_posts( get_current_user_id(), "school_profile" ) && is_user_logged_in() && current_user_can('school-cap') ){ ?>
  23. <?php } ?>
  24.  
  25. <!-- redirect teacher if no profile -->
  26. <?php if ( 0 == count_user_posts( get_current_user_id(), "teacher-profile" ) && is_user_logged_in() && current_user_can('teacher-cap') && !current_user_can('admin-cap')) { ?>
  27. <?php wp_redirect( 'http://sandgroper.net/?page_id=498' ); exit; ?>
  28. <?php } elseif ( 1 == count_user_posts( get_current_user_id(), "teacher-profile" ) && is_user_logged_in() && current_user_can('teacher-cap') ) { ?>
  29. <?php } ?>
  30.  
  31.     <section id="primary" <?php generate_content_class(); ?>>
  32.         <main id="main" <?php generate_main_class(); ?>>   
  33.  
  34.  
  35.  
  36.  <!-- *************************************************************************************** -->      
  37.  <!-- ************************** TEACHER PROFILE cpt-teacher-profile ************************ -->  
  38.  <!-- *************************************************************************************** -->
  39.  
  40.  
  41. <?php $user_role = get_queried_object()->roles; ?>
  42. <?php if( in_array( strtolower('Teacher'), $user_role ) ) { ?>
  43. <?php /* Display all the author's posts from the custom post type (teacher-profile) */ ?>
  44. <?php
  45.     $authorid = get_the_author_meta( ID, $userID );
  46.    $args=array('author' => $authorid,'post_type' => 'teacher-profile', 'numberposts' => 1);
  47.     $cquery=new WP_Query($args);
  48.     if($cquery->have_posts()):
  49.     while($cquery->have_posts()):
  50.     $cquery->the_post();
  51. ?> 
  52.    
  53. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php generate_article_schema( 'BlogPosting' ); ?>>
  54.     <div class="inside-article homeheader">
  55.         <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
  56.         <!-- sandgroper -->
  57.         <ins class="adsbygoogle"
  58.         style="display:block"
  59.         data-ad-client="ca-pub-3761760999645154"
  60.         data-ad-slot="4393725687"
  61.         data-ad-format="auto"></ins>
  62.         <script>
  63.         (adsbygoogle = window.adsbygoogle || []).push({});
  64.         </script><br />
  65.     </div>
  66. </article>
  67.  
  68.    
  69. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  70.     <div class="inside-article">
  71.  
  72. <h1 class="page-title"><?php echo get_the_author(); ?></h1>
  73.             <ul>
  74.             <li><strong>Gender:</strong> <?php if(has_term('', 'teacher-gender')) {?><?php echo strip_tags (get_the_term_list( $post->ID, 'teacher-gender', ' ',', ')); ?><?php } else { ?><?php }?></li>
  75.             <li><strong>Date of Birth:</strong> <?php if( get_post_meta($post->ID, "teacher-dob", true) ): ?><?php echo get_post_meta($post->ID, "teacher-dob", true); ?><?php else: ?><?php endif; ?></li>
  76.             <li><strong>Phone:</strong> <?php if( get_post_meta($post->ID, "teacher-phone", true) ): ?><?php echo get_post_meta($post->ID, "teacher-phone", true); ?><?php else: ?><?php endif; ?></li>
  77.             <li><strong>Email:</strong> <?php if( get_post_meta($post->ID, "teacher-email", true) ): ?><?php echo get_post_meta($post->ID, "teacher-email", true); ?><?php else: ?><?php endif; ?></li>
  78.             <li><strong>Address:</strong> <?php if( get_post_meta($post->ID, "teacher-address", true) ): ?><?php echo get_post_meta($post->ID, "teacher-address", true); ?><?php else: ?><?php endif; ?> <?php if(has_term('', 'teacher-suburb')) {?><?php echo strip_tags(get_the_term_list( $post->ID, 'teacher-suburb', ' ',', ')); ?><?php } else { ?><?php }?> <?php if(has_term('', 'teacher-other-suburb')) {?><?php echo get_the_term_list( $post->ID, 'teacher-other-suburb', ' ',', '); ?><?php } else { ?><?php }?> <?php if(has_term('', 'teacher-state')) {?><?php echo strip_tags(get_the_term_list( $post->ID, 'teacher-state', ' ',', ')); ?><?php } else { ?><?php }?> <?php if( get_post_meta($post->ID, "teacher-postcode", true) ): ?><?php echo get_post_meta($post->ID, "teacher-postcode", true); ?><?php else: ?><?php endif; ?></li>
  79.             <li><strong>Grades/Years:</strong> <?php if(has_term('', 'teacher-year-level')) {?><?php echo strip_tags (get_the_term_list( $post->ID, 'teacher-year-level', ' ',', ')); ?><?php } else { ?><?php }?></li>
  80.             <li><strong>Learning Areas:</strong> <?php if(has_term('', 'teacher-learning-area')) {?><?php echo strip_tags (get_the_term_list( $post->ID, 'teacher-learning-area', ' ',', ')); ?><?php } else { ?><?php }?></li>
  81.             <li><strong>Qualifications:</strong> <?php if(has_term('', 'teacher-qualifications')) {?><?php echo strip_tags (get_the_term_list( $post->ID, 'teacher-qualifications', ' ',', ')); ?><?php } else { ?><?php }?></li>
  82.            
  83.     <?php $value = get_post_meta($post->ID, 'teacher-qualifications', true); ?>
  84.     <?php if($value == 'other') { ?>
  85.             <li><strong>Other Qualifications:</strong> <?php if( get_post_meta($post->ID, "teacher-other-qualification", true) ): ?><?php echo get_post_meta($post->ID, "teacher-other-qualification", true); ?><?php else: ?><?php endif; ?></li>
  86.     <?php } elseif($value == 'XXXXX') { ?>
  87.             XXXXX
  88.     <?php } else { ?>
  89.     <?php } ?>     
  90.            
  91.             <li><strong>Employment History:</strong> <?php the_content(); ?></li>
  92.             <li><strong>Skills:</strong> <?php if( get_post_meta($post->ID, "teacher-skills", true) ): ?><?php echo get_post_meta($post->ID, "teacher-skills", true); ?><?php else: ?><?php endif; ?></li>
  93.             </ul>
  94.            
  95.             <h2>Teacher Registration</h2>
  96.             <ul>
  97.             <li><strong>TRBWA ID:</strong> <?php if( get_post_meta($post->ID, "teacher-trbwa", true) ): ?><?php echo get_post_meta($post->ID, "teacher-trbwa", true); ?><?php else: ?><?php endif; ?></li>
  98.             <li><strong>WWCC ID:</strong> <?php if( get_post_meta($post->ID, "teacher-wwcc", true) ): ?><?php echo get_post_meta($post->ID, "teacher-wwcc", true); ?><?php else: ?><?php endif; ?></li>
  99.             <li><strong>WWCC expiry date:</strong> <?php if( get_post_meta($post->ID, "teacher-wwcc-date", true) ): ?><?php echo get_post_meta($post->ID, "teacher-wwcc-date", true); ?><?php else: ?><?php endif; ?></li>
  100.             <li><strong>E Number:</strong> <?php if( get_post_meta($post->ID, "teacher-enumber", true) ): ?><?php echo get_post_meta($post->ID, "teacher-enumber", true); ?><?php else: ?><?php endif; ?></li>
  101.             <li><strong>NPHC:</strong> <?php if(has_term('', 'teacher-nphc')) {?><?php echo strip_tags (get_the_term_list( $post->ID, 'teacher-nphc', ' ',', ')); ?><?php } else { ?><?php }?></li>
  102.             <li><strong>SCN:</strong> <?php if( get_post_meta($post->ID, "teacher-scn", true) ): ?><?php echo get_post_meta($post->ID, "teacher-scn", true); ?><?php else: ?><?php endif; ?></li>
  103.             </ul>
  104.            
  105.             <h2>Seeking</h2>
  106.             <ul>
  107.             <li><strong>Employment Status:</strong> <?php if(has_term('', 'teacher-job-status')) {?><?php echo strip_tags (get_the_term_list( $post->ID, 'teacher-job-status', ' ',', ')); ?><?php } else { ?><?php }?></li>
  108.             <li><strong>School Type:</strong> <?php if(has_term('', 'teacher-school-type')) {?><?php echo strip_tags (get_the_term_list( $post->ID, 'teacher-school-type', ' ',', ')); ?><?php } else { ?><?php }?></li>
  109.             <li><strong>Availability:</strong> <?php if(has_term('', 'teacher-availability')) {?><?php echo strip_tags (get_the_term_list( $post->ID, 'teacher-availability', ' ',', ')); ?><?php } else { ?><?php }?></li>
  110.            
  111.             <?php /***
  112.             <li>First day: <?php the_date('l jS F Y'); ?></li>
  113.             <li>Last Day: <?php $date = get_post_meta($post->ID, 'date-time-last', true); if($date != ''){echo date("l jS F Y", strtotime($date));} ?></li>
  114.             ***/ ?>        
  115.             </ul>
  116.     </div>
  117. </article><!-- #post-## -->
  118. <?
  119.     endwhile;
  120.         wp_reset_postdata();
  121.     endif; 
  122. ?>
  123.  
  124. <?php } elseif( in_array( strtolower('School'), $user_role ) ) { ?>
  125. <!-- school -->
  126. <?php } ?>
  127.  <!-- *************************************************************************************** -->      
  128.  <!-- ************************** SCHOOL NAME ************************** -->
  129.  <!-- *************************************************************************************** -->
  130. <?php $user_role = get_queried_object()->roles; ?>
  131. <?php if( in_array( strtolower('Teacher'), $user_role ) ) { ?>
  132. <!-- teacher -->
  133. <?php } elseif( in_array( strtolower('School'), $user_role ) ) { ?>
  134. <?php /* Display all the author's posts from the custom post type (school profile) */ ?>
  135.  <?php
  136.     $authorid = get_the_author_meta( ID, $userID );
  137.     $args4=array('author'=>$authorid,'post_type'=>'school_profile', 'numberposts'=> 1);
  138.     $cquery4=new WP_Query($args4);
  139.     if($cquery4->have_posts()):
  140.     while($cquery4->have_posts()):
  141.     $cquery4->the_post();
  142. ?>
  143.  
  144. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  145.     <div class="inside-article">
  146.     <h1 class="page-title"><?php the_title(); ?></h1>
  147.     </div>
  148. </article><!-- #post-## -->
  149. <?
  150.     endwhile;
  151.         wp_reset_postdata();
  152.     endif;
  153. ?>
  154. <?php } ?>
  155.  <!-- *************************************************************************************** -->      
  156.  <!-- ************************** AUTHOR META ************************************************ -->  
  157.  <!-- *************************************************************************************** -->  
  158. <?php $user_role = get_queried_object()->roles; ?>
  159. <?php if( in_array( strtolower('Teacher'), $user_role ) ) { ?>
  160. <!-- teacher -->
  161. <?php } elseif( in_array( strtolower('School'), $user_role ) ) { ?>
  162. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  163.     <div class="inside-article">
  164.         <div class="author-description">
  165.             <?php /** <h1 class="page-title"> echo get_the_author(); </h1> **/ ?>
  166.             <p class="author-bio" style="overflow:hidden"> 
  167.             <span style="float:left;padding:0px 10px 5px 0px;"><?php echo get_avatar( get_the_author_meta( 'ID' ), 75 ); ?></span>
  168.             <?php the_author_meta( 'description' ); ?>
  169.             </p>
  170.             <p style="text-align:center;"><?php the_author(); ?> has posted <?php the_author_posts(); ?> jobs</p>
  171.         </div>
  172.             <p style="float:right;"><?php fav_authors_link(); ?></p>
  173.            
  174.             <?php /**
  175.             <p><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" rel="author">Subscribe to Jobs</a></p>
  176.             **/ ?>
  177.            
  178.             <p style="float:left;"><?php echo do_shortcode('[subscribe-author-button]'); ?></p>
  179.     </div>
  180. </article>
  181. <?php } ?>
  182.  <!-- *************************************************************************************** -->      
  183.  <!-- ************************** SCHOOL PROFILE cpt-school_profile ************************** -->  
  184.  <!-- *************************************************************************************** -->
  185.  
  186.  
  187.  
  188. <?php $user_role = get_queried_object()->roles; ?>
  189. <?php if( in_array( strtolower('Teacher'), $user_role ) ) { ?>
  190. <!-- teacher -->
  191. <?php } elseif( in_array( strtolower('School'), $user_role ) ) { ?>
  192. <?php /* Display all the author's posts from the custom post type (school profile) */ ?>
  193.  <?php
  194.     $authorid = get_the_author_meta( ID, $userID );
  195.     $args4=array('author'=>$authorid,'post_type'=>'school_profile', 'numberposts'=> 1);
  196.     $cquery4=new WP_Query($args4);
  197.     if($cquery4->have_posts()):
  198.     while($cquery4->have_posts()):
  199.     $cquery4->the_post();
  200. ?>
  201.  
  202. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  203.     <div class="inside-article">
  204.     <h1 class="page-title"><?php the_title(); ?></h1>
  205.             <ul>
  206.             <br />
  207.             <li><strong>Address:</strong> <?php if( get_post_meta($post->ID, "school-street", true) ): ?><?php echo get_post_meta($post->ID, "school-street", true); ?><?php else: ?><?php endif; ?> <?php if(has_term('', 'school-suburb')) {?><?php echo strip_tags(get_the_term_list( $post->ID, 'school-suburb', ' ',', ')); ?><?php } else { ?><?php }?> <?php if(has_term('', 'school-other-suburb')) {?><?php echo get_the_term_list( $post->ID, 'school-other-suburb', ' ',', '); ?><?php } else { ?><?php }?> <?php if(has_term('', 'school-state')) {?><?php echo strip_tags(get_the_term_list( $post->ID, 'school-state', ' ',', ')); ?><?php } else { ?><?php }?> <?php if( get_post_meta($post->ID, "school-postcode", true) ): ?><?php echo get_post_meta($post->ID, "school-postcode", true); ?><?php else: ?><?php endif; ?><br /><br /></li>
  208.             <li><strong>Phone:</strong> <?php if( get_post_meta($post->ID, "school-phone", true) ): ?><a href="tel:<?php echo get_post_meta($post->ID, "school-phone", true); ?>"><?php echo get_post_meta($post->ID, "school-phone", true); ?></a><?php else: ?><?php endif; ?></li>
  209.             <li><strong>Mobile:</strong> <?php if( get_post_meta($post->ID, "school-mobile", true) ): ?><a href="tel:<?php echo get_post_meta($post->ID, "school-mobile", true); ?>"><?php echo get_post_meta($post->ID, "school-mobile", true); ?></a><?php else: ?><?php endif; ?></li>
  210.             <li><strong>School contact:</strong> <?php if( get_post_meta($post->ID, "school-contact", true) ): ?><?php echo get_post_meta($post->ID, "school-contact", true); ?><?php else: ?><?php endif; ?><br /><br /></li>             
  211.             <li><strong>Email:</strong> <?php if( get_post_meta($post->ID, "school-email", true) ): ?><?php echo get_post_meta($post->ID, "school-email", true); ?><?php else: ?><?php endif; ?></li>
  212.             <li><strong>Website:</strong> <?php if( get_post_meta($post->ID, "school-website", true) ): ?><a href="http://<?php echo get_post_meta($post->ID, "school-website", true); ?>"><?php echo get_post_meta($post->ID, "school-website", true); ?></a><?php else: ?><?php endif; ?><br /><br /></li>
  213.             <li><strong>Grades/Years:</strong> <?php if(has_term('', 'school-year-level')) {?>
  214.             <?php
  215.                 $taxonomy = 'school-year-level';
  216.                 $args = array('orderby' => 'slug', 'order' => 'ASC', 'fields' => 'all');
  217.                 $product_terms = wp_get_object_terms( $post->ID, $taxonomy, $args );
  218.  
  219.                 if ( ! empty( $product_terms ) && ! is_wp_error( $product_terms ) ) {
  220.                     $terms = array();
  221.                     foreach( $product_terms as $term ) {
  222.                         $terms[] = esc_html( $term->name );
  223.                     }
  224.                     echo join( ', ', $terms );
  225.                 }          
  226.             ?>
  227.             <?php } else { ?><?php }?>
  228.             </li>
  229.             <li><strong>Learning Areas:</strong> <?php if(has_term('', 'school-learning-areas')) {?><?php echo strip_tags (get_the_term_list( $post->ID, 'school-learning-areas', ' ',', ')); ?><?php } else { ?><?php }?></li>
  230.             <li><strong>Information:</strong> <?php the_content(); ?></li>             
  231.             </ul>
  232.             <small style="color:#555;">Sandgroper ID: #<?php the_author_meta('ID'); ?></small>         
  233.            
  234.     </div>
  235. </article><!-- #post-## -->
  236. <?
  237.     endwhile;
  238.         wp_reset_postdata();
  239.     endif;
  240. ?>
  241. <?php } ?>
  242.  <!-- *************************************************************************************** -->      
  243.  <!-- ************************** SCHOOL JOBS cpt-post *************************************** -->  
  244.  <!-- *************************************************************************************** -->
  245. <?php $user_role = get_queried_object()->roles; ?>
  246. <?php if( in_array( strtolower('Teacher'), $user_role ) ) { ?>
  247. <!-- teacher -->
  248. <?php } elseif( in_array( strtolower('School'), $user_role ) ) { ?>
  249. <?php
  250.     $authorid = get_the_author_meta( ID, $userID );
  251.     $args3=array('author'=>$authorid,'post_type'=>'post', 'numberposts'=> -1, 'order' => 'ASC');
  252.     $cquery3=new WP_Query($args3);
  253.     if($cquery3->have_posts()):
  254.     while($cquery3->have_posts()):
  255.     $cquery3->the_post();
  256.  ?>
  257.  
  258. <?php $value = get_post_meta($post->ID, 'comment_status', true); ?>
  259. <?php if($value == 'Open') { ?>
  260.  
  261. <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">   
  262. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php generate_article_schema( 'BlogPosting' ); ?>>
  263.     <div class="inside-article">
  264.         <?php do_action( 'generate_before_content'); ?>
  265.         <header class="entry-header">
  266.        
  267. <?php $value = get_post_meta($post->ID, 'school-job-status', true); ?>
  268. <?php if($value == 'Open') { ?>    
  269.         <p><?php the_title(); ?></p>
  270.         <small style="color:#333;"><?php if(has_term('', 'school-job-duration')) {?><?php echo strip_tags( get_the_term_list( $post->ID, 'school-job-duration', ' ',', ')); ?><?php } else { ?><?php }?><?php if(has_term('', 'school-job-year-level')) {?> &middot; year <?php echo strip_tags( get_the_term_list( $post->ID, 'school-job-year-level', ' ',', ')); ?><?php } else { ?><?php }?><?php if(has_term('', 'school-job-learning-area')) {?> &middot; <?php echo strip_tags(get_the_term_list( $post->ID, 'school-job-learning-area', ' ',', ')); ?><?php } else { ?><?php }?></small>
  271. <?php } elseif($value == 'Close') { ?>
  272.         <p style="text-decoration:line-through;"><?php the_title(); ?><br />
  273.         <small style="color:#333;"><?php if(has_term('', 'school-job-duration')) {?><?php echo strip_tags( get_the_term_list( $post->ID, 'school-job-duration', ' ',', ')); ?><?php } else { ?> 1 day<?php }?><?php if(has_term('', 'school-job-year-level')) {?> &middot; year <?php echo strip_tags( get_the_term_list( $post->ID, 'school-job-year-level', ' ',', ')); ?><?php } else { ?><?php }?><?php if(has_term('', 'school-job-learning-area')) {?> &middot; <?php echo strip_tags(get_the_term_list( $post->ID, 'school-job-learning-area', ' ',', ')); ?><?php } else { ?><?php }?></small></p>         
  274.         <?php /*** if ( 'post' == get_post_type() ) : ?>
  275.         <p>by <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author(); ?></a></p>
  276.         <?php endif; ****/ ?>          
  277.         <p style="font-weight:700;color:red;">This job is closed and no longer available</p>   
  278. <?php } else { ?><?php } ?>
  279.  
  280.                        
  281.             <?php /*** if ( 'post' == get_post_type() ) : ?>
  282.             <p>by <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author(); ?></a></p>
  283.             <?php endif; ****/ ?>
  284.         </header><!-- .entry-header -->
  285.        
  286.         <?php do_action( 'generate_after_entry_header'); ?>        
  287.         <?php do_action( 'generate_after_entry_content'); ?>
  288.         <!-- <footer class="entry-meta">
  289.             <?php /**** generate_entry_meta(); ****/ ?>
  290.         </footer>.entry-meta -->
  291.         <?php do_action( 'generate_after_content'); ?>
  292.     </div><!-- .inside-article -->
  293. </article><!-- #post-## -->
  294. </a>
  295.  
  296.  
  297.  
  298. <?php } elseif($value == 'Close') { ?>
  299. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php generate_article_schema( 'BlogPosting' ); ?>>
  300.     <div class="inside-article">
  301.         <?php do_action( 'generate_before_content'); ?>
  302.         <header class="entry-header">
  303.             <p style="text-decoration:line-through;"><?php the_title(); ?></p>         
  304.             <?php /*** if ( 'post' == get_post_type() ) : ?>
  305.             <p>by <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author(); ?></a></p>
  306.             <?php endif; ****/ ?>          
  307.             <p style="font-weight:700;color:red;">This job is closed and no longer available</p>
  308.         </header><!-- .entry-header -->
  309.        
  310.         <?php do_action( 'generate_after_entry_header'); ?>        
  311.         <?php do_action( 'generate_after_entry_content'); ?>
  312.         <!-- <footer class="entry-meta">
  313.             <?php /**** generate_entry_meta(); ****/ ?>
  314.         </footer>.entry-meta -->
  315.         <?php do_action( 'generate_after_content'); ?>
  316.     </div><!-- .inside-article -->
  317. </article><!-- #post-## -->
  318.  
  319. <?php } else { ?>
  320. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php generate_article_schema( 'BlogPosting' ); ?>>   
  321.     <div class="inside-article">
  322.         <?php do_action( 'generate_before_content'); ?>
  323.         <header class="entry-header">
  324.             <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><p><?php the_title(); ?></p></a>           
  325.             <?php /*** if ( 'post' == get_post_type() ) : ?>
  326.             <p>by <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author(); ?></a></p>
  327.             <?php endif; ****/ ?>
  328.             <p style="font-weight:700;color:red;">We are unsure of the status of this job, please contact <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author(); ?></a> for more information</p>
  329.         </header><!-- .entry-header -->
  330.         <?php do_action( 'generate_after_entry_header'); ?>        
  331.         <?php do_action( 'generate_after_entry_content'); ?>
  332.         <!-- <footer class="entry-meta">
  333.             <?php /**** generate_entry_meta(); ****/ ?>
  334.         </footer>.entry-meta -->
  335.         <?php do_action( 'generate_after_content'); ?>
  336.     </div><!-- .inside-article -->
  337. </article><!-- #post-## -->
  338. <?php } ?>
  339.  
  340. <?
  341.     endwhile;
  342.         wp_reset_postdata();
  343.     endif;
  344. ?>
  345. <?php } ?>
  346.  <!-- *************************************************************************************** -->      
  347.  <!-- ************************** TEACHER availability *************************************** -->  
  348.  <!-- *************************************************************************************** -->
  349. <?php
  350.     $authorid = get_the_author_meta( ID, $userID );
  351.     $args2=array('author'=>$authorid,'post_type'=>'teacher-profile', 'numberposts'=>1);
  352.     $cquery2=new WP_Query($args2);
  353.     if($cquery2->have_posts()):
  354.     while($cquery2->have_posts()):
  355.     $cquery2->the_post();
  356. ?>
  357. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  358.     <div class="inside-article">
  359.         <h2>Availability</h2>
  360.         <?php if(has_term('', 'teacher-availability')) {?>
  361.         <p><?php echo strip_tags (get_the_term_list( $post->ID, 'teacher-availability', ' ',', ')); ?></p>
  362.         <?php } else { ?>
  363.         <?php }?>
  364.     </div>
  365. </article><!-- #post-## -->
  366. <?
  367.     endwhile;
  368.         wp_reset_postdata();
  369.     endif;
  370. ?>
  371.  
  372.  
  373.         </main><!-- #main -->
  374.     </section><!-- #primary -->
  375.    
  376. <?php } ?>
  377.  
  378. <?php
  379. do_action('generate_sidebars');
  380. get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement