| | |
| | | if (is_post_type_archive($registered)) { |
| | | $this->params = ['all']; |
| | | } elseif (is_tax($taxonomies)) { |
| | | $this->params = []; |
| | | $this->params = ['tax']; |
| | | } else { |
| | | $this->params = []; |
| | | } |
| | |
| | | |
| | | $dates = $this->getDateNavigation(); |
| | | |
| | | if (!is_post_type_archive($this->firstContent()) || $this->isDatedArchive()) { |
| | | if (is_tax() || !is_post_type_archive($this->firstContent()) || $this->isDatedArchive()) { |
| | | echo sprintf( |
| | | '<a href="%s" class="btn chip">All Events</a>', |
| | | get_post_type_archive_link($this->firstContent()) |
| | |
| | | |
| | | protected function getCurrentPostTypes():array |
| | | { |
| | | if (is_post_type_archive()) { |
| | | if (is_post_type_archive() && !is_tax()) { |
| | | return [get_queried_object()->name]; |
| | | } |
| | | if (is_singular()) { |
| | | return [get_queried_object()->post_type]; |
| | | } |
| | | if (is_tax()) { |
| | | $tax = get_queried_object(); |
| | | jvbDump($tax, 'taxonomy'); |
| | | return [get_post_type()]; |
| | | } |
| | | return []; |
| | | } |