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( get_field('post_name') ) { ?> | |
<p><?php echo get_field('post_name');?></p> | |
<?php } | |
$image = get_field('post_image'); | |
if( !empty($image) ): ?> | |
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" /> | |
<?php endif; ?> |
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
<html> | |
<head> | |
<link type="text/css" rel="stylesheet" href="<?php echo get_bloginfo( 'stylesheet_url' ); ?>" media="all" /> | |
<?php | |
$wp_head = get_option( 'dkpdf_print_wp_head', '' ); | |
if( $wp_head == 'on' ) { | |
wp_head(); | |
} | |
?> | |
<style type="text/css"> |
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 echo do_shortcode('[dkpdf-button]'); ?> |
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 | |
function changing_dkpdf_pdf_format( $format ) { | |
$format = 'Royal'; | |
return $format; | |
} | |
add_filter( 'dkpdf_pdf_format', 'changing_dkpdf_pdf_format' ); |
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 | |
function changing_dkpdf_header_title( $title ) { | |
if ( have_posts() ) : while ( have_posts() ) : the_post(); | |
$title .= ' by ' . get_the_author_meta( 'display_name' ); | |
endwhile; else: | |
endif; | |
return $title; | |
} | |
add_filter( 'dkpdf_header_title', 'changing_dkpdf_header_title' ); |
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
<img src="http://dkpdfg-book.dev/wp-content/uploads/2016/03/abbott-david-p.jpg" /> | |
<p style="width:100%;">Credits: <a href="http://www.readbookonline.net/stories/Abbott/1189/">readbookonline</a> & <a href="https://unsplash.com">unsplash</a></p> |
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
<body> | |
<?php | |
// get selected posts | |
$dkpdfg_selected_posts = get_option( 'dkpdfg_selected_posts', array() ); | |
// print_r($dkpdfg_selected_posts); Array ( [0] => 9031 [1] => 391 [2] => 598 [3] => 495 ) | |
$inserted = array(9032); | |
array_splice( $dkpdfg_selected_posts, 2, 0, $inserted ); // added to position 2 |
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
<div style="width:100%;float:left;"> | |
<img src="http://path/to/myimage.jpg"> | |
</div> |
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 | |
function custom_dkpdf_before_content() { | |
$output = '<div style="margin-bottom:25px;width:100%;background:#CCC;">Before content text</div>'; | |
return $output; | |
} | |
add_filter( 'dkpdf_before_content', 'custom_dkpdf_before_content' ); | |
function custom_dkpdf_after_content() { | |
$output = '<div style="margin-top:25px;width:100%;background:#CCC;">After content text</div>'; | |
return $output; |