Skip to content

Commit 30daa29

Browse files
committed
Added the post thumbnail for poseidon
1 parent 17aaaf8 commit 30daa29

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

includes/theme-support/class-alnp-poseidon.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,26 @@ public static function init() {
3131
// Add theme support and preset the theme selectors.
3232
add_action( 'after_setup_theme', array( __CLASS__, 'add_theme_support' ) );
3333

34+
// Display the post thumbnail before the content.
35+
add_action( 'alnp_load_before_content', array( __CLASS__, 'the_post_thumbnail' ), 10 );
36+
3437
// Filters the repeater template location.
3538
add_filter( 'alnp_template_location', array( __CLASS__, 'alnp_poseidon_template_location' ) );
3639
} // END init()
3740

41+
/**
42+
* Display the post thumbnail before the content if the
43+
* theme is set to display them only in the header.
44+
*
45+
* @access public
46+
* @static
47+
*/
48+
public static function the_post_thumbnail() {
49+
if ( is_single() && has_post_thumbnail() && 'header' == $theme_options['post_layout_single'] ) {
50+
the_post_thumbnail();
51+
}
52+
} // END the_post_thumbnail()
53+
3854
/**
3955
* Filters the template location for get_template_part().
4056
*

0 commit comments

Comments
 (0)