Advertisement
pjeaje

content-single-post.php

Apr 15th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.39 KB | None | 0 0
  1. <?php
  2. /**
  3. * @package GeneratePress
  4. */
  5. ?>
  6.  
  7. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php generate_article_schema( 'BlogPosting' ); ?>>
  8.     <div class="inside-article">
  9.         <?php do_action( 'generate_before_content'); ?>
  10.        
  11.  
  12.    
  13.         <header class="entry-header">
  14.                 <?php $value = get_post_meta($post->ID, 'job_status', true); ?>
  15.                 <?php if($value == 'open') { ?>    
  16.                     <h2><?php the_title(); ?></h2>
  17.                 <?php } elseif($value == 'closed') { ?>
  18.                     <h2 style="text-decoration:line-through;"><?php the_title(); ?></h2>                   
  19.                     <p style="font-weight:700;color:red;">This job is closed and no longer available</p>
  20.                     <p>Look for more jobs by <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author(); ?></a> &raquo;</p>
  21.                 <?php } else { ?>
  22.                     <p>?? <?php the_title(); ?> ??</p>                 
  23.                     <p style="font-weight:700;color:red;">The status of this job is unknown!</p>
  24.                     <p>You need <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">contact <?php the_author(); ?></a> to find out if this job is available or not.</p>
  25.                 <?php } ?> 
  26.         </header><!-- .entry-header -->
  27.  
  28.         <?php do_action( 'generate_after_entry_header'); ?>
  29.         <div class="entry-content" itemprop="text">
  30. <?php $value = get_post_meta($post->ID, 'job_status', true); ?>
  31. <?php if($value == 'open') { ?>    
  32.             <?php the_content(); ?>
  33.             <ul>
  34.             <li>School<span></span>: <?php the_author(); ?></li>
  35.             <li>School level: <?php the_category(); ?></li>
  36.             <li>First day: <?php the_date('l jS F Y'); ?></li>
  37.             <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>
  38.             <li>Duration: <?php if(has_term('', 'job_duration')) {?><?php echo strip_tags (get_the_term_list( $post->ID, 'job_duration', ' ',', ')); ?><?php } else { ?> at least one day<?php }?></li>
  39.             <li>Year level/s: <?php if(has_term('', 'school-year-level')) {?><?php echo get_the_term_list( $post->ID, 'school-year-level', ' ',', '); ?><?php } else { ?> unknown year level/s<?php }?></li>
  40.             <li>Learning areas: <?php if(has_term('', 'school-learning-area')) {?><?php echo get_the_term_list( $post->ID, 'school-learning-area', ' ',', '); ?><?php } else { ?> unknown learning areas<?php }?></li>
  41.             <li>Subjects/Topics: <?php the_tags(); ?></li>
  42.             </ul>
  43.  
  44. <?php } elseif($value == 'closed') { ?>
  45. <?php } else { ?><?php } ?>
  46.  
  47.             <h3 style="float:left;"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" ><i class="fa fa-info-circle"></i> school info</a></h3>
  48.             <?php /*
  49.             <p style="float:right;"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" rel="author">subscribe to all jobs by this school <i class="fa fa-inbox" ></i></a></p>
  50.             */ ?>
  51.  
  52.             <?php
  53.             wp_link_pages( array(
  54.                 'before' => '<div class="page-links">' . __( 'Pages:', 'generate' ),
  55.                 'after'  => '</div>',
  56.             ) );
  57.             ?>         
  58.            
  59.         </div><!-- .entry-content -->
  60.         <?php do_action( 'generate_after_entry_content'); ?>
  61.  
  62.         <!-- <footer class="entry-meta">
  63.             <?php /* generate_entry_meta(); */ ?>
  64.             <?php /* generate_content_nav( 'nav-below' ); */ ?>
  65.             <?php /* edit_post_link( __( 'Edit', 'generate' ), '<span class="edit-link">', '</span>' ); */ ?>
  66.         </footer>.entry-meta -->
  67.         <?php do_action( 'generate_after_content'); ?>
  68.     </div><!-- .inside-article -->
  69.  
  70. </article><!-- #post-## -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement