elementor / elementor/elementor

Elementor Pro: archive.php never reached with Locations API

Open
#15,985 2 comments 0 reactions 0 assignees View on GitHub
mod/q*
Dominant language
PHP
Stars
7.1k
Forks
1.6k
Avg merge
1d 5h
Merged PRs (30d)
193

Description

I have registered all core locations using the recommended filter:

```
add_action('elementor/theme/register_locations', function($manager) {
$manager->register_all_core_location();
}
```

The docs suggest using on archive.php:
```
if ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'archive' ) ) {
get_template_part( 'template-parts/archive' );
}
```

However, archive.php is never even reached for custom archives built using Elementor. It looks like Elementor just uses a custom header-footer.php template instead.

Looks like it's a bug or wrong documentation.

P.S. correction for docs: You may want to update https://developers.elementor.com/theme-locations-api/registering-locations/ to use use `register_core_location()` for single locations. `register_location()` is wrong.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.