Astra_Ext_Advanced_Headers_Markup::remove_post_thumbnail( boolean $is_featured )

Remove Post Featured Image If advanced headers is enable with featured image as background image


Description


Parameters

$is_featured

(boolean) (Required) Markup of featured image.


Return

(boolean) $is_featured


Source

File: addons/advanced-headers/classes/class-astra-ext-advanced-headers-markup.php

		public function remove_post_thumbnail( $is_featured ) {

			if ( self::advanced_header_enabled() ) {

				if ( ! ( is_archive() || is_home() || is_search() || is_404() || wp_doing_ajax() ) ) {

					$page_post_featured      = Astra_Ext_Advanced_Headers_Loader::astra_advanced_headers_design_option( 'page-post-featured' );
					$advanced_headers_layout = Astra_Ext_Advanced_Headers_Loader::astra_advanced_headers_layout_option( 'layout' );

					// If selected Post / Page Featured image.
					if ( 'disable' != $advanced_headers_layout && 'enabled' == $page_post_featured ) {
						$is_featured = false;
					}
				}
			}

			return $is_featured;

		}


User Contributed Notes

You must log in before being able to contribute a note or feedback.