WC_Query::is_showing_page_on_front()
Are we currently on the front page?
Method of the class: WC_Query{}
No Hooks.
Return
true|false
.
Usage
// private - for code of main (parent) class only $result = $this->is_showing_page_on_front( $q );
- $q(WP_Query) (required)
- Query instance.
WC_Query::is_showing_page_on_front() WC Query::is showing page on front code WC 7.7.0
private function is_showing_page_on_front( $q ) { return ( $q->is_home() && ! $q->is_posts_page ) && 'page' === get_option( 'show_on_front' ); }