Forked from azimpact/gist:ac77ab2c92281ac7df0e26e5e87b51c6
Last active
May 19, 2017 12:17
-
-
Save DavidCramer/92d0b2c3996f40068bd85fadd3104f23 to your computer and use it in GitHub Desktop.
Facet Page Layout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! have_posts() ) { | |
echo 'Nothing, sorry.'; | |
return; | |
} | |
?> | |
<table> | |
<thead> | |
<tr> | |
<td>Title</td> | |
<td>Location</td> | |
<td>Date</td> | |
<td>Status</td> | |
</tr> | |
</thead> | |
<tbody> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<tr> | |
<td id="jobberdiv1" class="jobbercontent"><a | |
href="<?php the_permalink(); ?>"> | |
<?php $trimit1 = get_the_title(); | |
$getlength = mb_strlen( $trimit1 ); | |
$thelength = 55; | |
echo mb_substr( $trimit1, 0, $thelength ); | |
if ( $getlength > $thelength ) { | |
echo "..."; | |
} | |
?> | |
</a></td> | |
<td id="jobberdiv2" | |
class="jobbercontent"><?php //echo get_post_meta($post->ID, 'job_location', true); | |
$trimit = get_post_meta( $post->ID, 'job_location', true ); | |
$getlength = mb_strlen( $trimit ); | |
$thelength = 25; | |
echo mb_substr( $trimit, 0, $thelength ); | |
if ( $getlength > $thelength ) { | |
echo "..."; | |
} | |
?></td> | |
<td id="jobberdiv3" | |
class="jobbercontent"><?php echo get_the_date( 'm-Y' ); ?></td> | |
<td id="jobberdiv4" | |
class="jobbercontent"><?php echo get_post_meta( $post->ID, 'Status', true ); ?></td> | |
</tr> | |
<?php endwhile; ?> | |
</tbody> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment