Custom Archive and Polylang
-
I want to translate Custom Archive Descriptions, but Polylang can’t find it. I have to edit the file app/Common/Meta/Description.php and add pll__().
How can this be fixed differently?
if ( is_post_type_archive() ) { $postType = get_queried_object(); if ( is_a( $postType, 'WP_Post_Type' ) ) { $dynamicOptions = aioseo()->dynamicOptions->noConflict(); if ( $dynamicOptions->searchAppearance->archives->has( $postType->name ) ) { return pll__($this->helpers->prepare( aioseo()->dynamicOptions->searchAppearance->archives->{ $postType->name }->metaDescription )); } } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom Archive and Polylang’ is closed to new replies.