The inbox shortcode on the front page displays posts instead of the workflow detail

This happens when the Gravity PDF plugin is running. You can resolve this issue by adding the following snippet to your theme functions.php file.

/**
 * Fix front page issue; Gravity PDF registers the lid query var causing posts to be displayed instead of the detail page.
 *
 * @param WP_Query $query The WP_Query instance (passed by reference).
 */
function gravity_flow_action_pre_get_posts( $query ) {
	if ( ! $query->is_main_query() || ! function_exists( 'gravity_flow' ) || is_admin() ) {
		return;
	}
	
	if ( $query->get( 'lid' ) && gravity_flow()->is_workflow_detail_page() && get_option( 'show_on_front' ) == 'page' ) {
		$page_id = get_option( 'page_on_front' );
		$page    = get_post( $page_id );

		if ( stripos( $page->post_content, '[gravityflow' ) !== false ) {
			gravity_flow()->log_debug( __METHOD__ . '(): fixing front page lid issue.' );

			$query->set( 'page_id', $page_id );
			$query->is_page        = true;
			$query->queried_object = $page;
		}
	}
}
add_action( 'pre_get_posts', 'gravity_flow_action_pre_get_posts' );

Still need help? Contact Support Contact Support