public function resetLandingPage() {

		/** @var $wpdb \wpdb */
		global $wpdb;

		update_option( 'show_on_front', 'page' );

		$id = $wpdb->get_var( "SELECT ID FROM {$wpdb->posts} WHERE post_name = 'cover' AND post_type = 'page' AND post_status = 'publish' " );
		if ( $id ) {
			update_option( 'page_on_front', $id );
		}

		$id = $wpdb->get_var( "SELECT ID FROM {$wpdb->posts} WHERE post_name = 'table-of-contents' AND post_type = 'page' AND post_status = 'publish' " );
		if ( $id ) {
			update_option( 'page_for_posts', $id );
		}
	}
public function resetLandingPage() {

		/** @var $wpdb \wpdb */
		global $wpdb;

		update_option( 'show_on_front', 'page' );

		$id = $wpdb->get_var( "SELECT ID FROM {$wpdb->posts} WHERE post_name = 'cover' AND post_type = 'page' AND post_status = 'publish' " );
		if ( $id ) {
			update_option( 'page_on_front', $id );
		}

		$id = $wpdb->get_var( "SELECT ID FROM {$wpdb->posts} WHERE post_name = 'table-of-contents' AND post_type = 'page' AND post_status = 'publish' " );
		if ( $id ) {
			update_option( 'page_for_posts', $id );
		}
	}
public function resetLandingPage ( ) { /** @var $wpdb \wpdb */ global $ wpdb ; update_option ( 'show_on_front' , 'page' ) ; $ id = $ wpdb -> get_var ( "SELECT ID FROM {$wpdb->posts} WHERE post_name = 'cover' AND post_type = 'page' AND post_status = 'publish' " ) ; if ( $ id ) { update_option ( 'page_on_front' , $ id ) ; } $ id = $ wpdb -> get_var ( "SELECT ID FROM {$wpdb->posts} WHERE post_name = 'table-of-contents' AND post_type = 'page' AND post_status = 'publish' " ) ; if ( $ id ) { update_option ( 'page_for_posts' , $ id ) ; } }
Fix broken landing page
Fix broken landing page