Skip to content

Instantly share code, notes, and snippets.

@rgadon107
Created May 27, 2016 21:59
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 rgadon107/437c0492546e1a928f43bcbd3b5aec7d to your computer and use it in GitHub Desktop.
Save rgadon107/437c0492546e1a928f43bcbd3b5aec7d to your computer and use it in GitHub Desktop.
<?php
namespace albemishpc\promotion;
/**
* Custom post template for 'Promotion' post type.
*
* @package A. L. Bemish, P.C.
* @since 1.0.0
* @author Robert A. Gadon
* @license GPL-2.0+
* @link http://spiralwebdb.com
*/
add_action( 'genesis_before_entry_content', __NAMESPACE__ . '\add_post_subtitle' );
/**
* Add custom text field after title and before entry-content.
*
* @since 1.0.0
*
* @return void
*/
function add_post_subtitle() {
$allowed_html = array(a, alt, br, em, h1, h2, h3, h4, h5, h6, href, p, rel, title );
$subtitle = the_field( 'post_subtitle_before_entry_content' );
$subtitle = wp_kses( $subtitle, $allowed_html );
include( __DIR__ . '/templates/views/promotion-page.php' );
}
add_action( 'genesis_after_entry_content', __NAMESPACE__ . '\render_output_after_entry_content' );
/**
* Add custom text field after entry-content.
*
* @since 1.0.0
*
* @return void
*/
function render_output_after_entry_content() {
$allowed_html = array(a, alt, br, em, h1, h2, h3, h4, h5, h6, href, p, rel, title );
$subtitle = the_field( 'output_after_entry_content' );
$subtitle = wp_kses( $subtitle, $allowed_html );
}
genesis();
@rgadon107
Copy link
Author

Initial commit for single-promotion.php.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment