WC_Query::is_showing_page_on_front()
Are we currently on the front page?
Метод класса: WC_Query{}
Хуков нет.
Возвращает
true|false
.
Использование
// private - только в коде основоного (родительского) класса $result = $this->is_showing_page_on_front( $q );
- $q(WP_Query) (обязательный)
- Query instance.
Код WC_Query::is_showing_page_on_front() WC Query::is showing page on front WC 8.7.0
private function is_showing_page_on_front( $q ) { return ( $q->is_home() && ! $q->is_posts_page ) && 'page' === get_option( 'show_on_front' ); }