Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* dkpdfg-index.php
* This template is used to display the content in the PDF
*
* Do not edit this template directly,
* copy this template and paste in your theme (or child theme) inside a directory named dkpdfg
*/
?>
<html>
<head>
<link type="text/css" rel="stylesheet" href="<?php echo get_bloginfo( 'stylesheet_url' ); ?>" media="all" />
<style type="text/css">
body {
background: #FFF;
font-size: 100%;
}
</style>
</head>
<body>
<?php
global $post;
$pdf = get_query_var( 'pdf' );
$post_type = get_post_type( $pdf );
$args = array(
'p' => $pdf,
'post_type' => $post_type,
'post_status' => 'publish',
);
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {
$the_query->the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php ws_job_location(); ?>
<?php
$expired_date = get_post_meta( $post->ID, '_job_expires', true );
$hide_expiration = get_post_meta( $post->ID, '_hide_expiration', true );
echo $expired_date.' - '.$hide_expiration;
?>
<?php }
}
wp_reset_postdata();
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.