astra_blog_post_thumbnail_and_title_order( array $remove_elements = array() )

Blog post Thubmnail, Title & Blog Meta order


Description


Parameters

$remove_elements

(array) (Optional) Remove unwanted sections.

Default value: array()


Source

File: inc/blog/blog.php

	function astra_blog_post_thumbnail_and_title_order() {

		$blog_post_thumb_title_order = astra_get_option( 'blog-post-structure' );
		if ( is_single() ) {
			$blog_post_thumb_title_order = astra_get_option( 'blog-single-post-structure' );
		}
		if ( is_array( $blog_post_thumb_title_order ) ) {
			// Append the custom class for second element for single post.
			foreach ( $blog_post_thumb_title_order as $post_thumb_title_order ) {

				switch ( $post_thumb_title_order ) {

					// Blog Post Featured Image.
					case 'image':
						do_action( 'astra_blog_archive_featured_image_before' );
						astra_get_blog_post_thumbnail( 'archive' );
						do_action( 'astra_blog_archive_featured_image_after' );
						break;

					// Blog Post Title and Blog Post Meta.
					case 'title-meta':
						do_action( 'astra_blog_archive_title_meta_before' );
						astra_get_blog_post_title_meta();
						do_action( 'astra_blog_archive_title_meta_after' );
						break;

					// Single Post Featured Image.
					case 'single-image':
						do_action( 'astra_blog_single_featured_image_before' );
						astra_get_blog_post_thumbnail( 'single' );
						do_action( 'astra_blog_single_featured_image_after' );
						break;

						// Single Post Title and Single Post Meta.
					case 'single-title-meta':
						do_action( 'astra_blog_single_title_meta_before' );
						astra_get_single_post_title_meta();
						do_action( 'astra_blog_single_title_meta_after' );
						break;
				}
			}
		}
	}

Changelog

Changelog
Version Description
1.0.8 Introduced.


User Contributed Notes

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