Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created January 17, 2019 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/cfc112b9bbbe37aa9a62890ba7e61709 to your computer and use it in GitHub Desktop.
Save billerickson/cfc112b9bbbe37aa9a62890ba7e61709 to your computer and use it in GitHub Desktop.
<?php
/**
* FAQ template for Display Posts
*
*/
function be_dps_faq_template( $output, $original_atts ) {
$file = plugins_url( 'dps-faq-template.php' );
if( 'faq' == get_post_type() && file_exists( $file ) ) {
ob_start();
include( $file );
$output = ob_get_clean();
}
return $output;
}
add_action( 'display_posts_shortcode_output', 'be_dps_faq_template', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment