Created
May 27, 2016 21:59
-
-
Save rgadon107/437c0492546e1a928f43bcbd3b5aec7d to your computer and use it in GitHub Desktop.
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 | |
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(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Initial commit for
single-promotion.php
.