Disables Tainacan default the_content filter as we use template hierarchy to override it.

This commit is contained in:
mateuswetah 2023-02-28 14:38:52 -03:00
parent 727ce3e0fb
commit bef62d9251
2 changed files with 13 additions and 1 deletions

View File

@ -3,6 +3,10 @@
/** Theme version */ /** Theme version */
const TAINACAN_INTERFACE_VERSION = '2.6'; const TAINACAN_INTERFACE_VERSION = '2.6';
/* Disables Tainacan Theme Helper the_content filter, which is used to build a custom item and taxonomy (terms list) template. */
define('TAINACAN_DISABLE_ITEM_THE_CONTENT_FILTER', true);
define('TAINACAN_DISABLE_TAXONOMY_THE_CONTENT_FILTER', true);
/** /**
* Setup Theme * Setup Theme
*/ */

View File

@ -78,7 +78,15 @@
</div> </div>
<?php get_template_part( 'template-parts/loop-tainacan-terms', $view_mode ); ?> <?php
if ( function_exists('tainacan_get_single_taxonomy_content') )
get_template_part( 'template-parts/loop-tainacan-terms', $view_mode );
else {
echo '<div style="text-aling: center; max-width: 600px; margin: 2em auto; width: 100%; font-style: italic;">';
echo '<p>' . __('It seems that you are using a legacy vesion of the Tainacan plugin. Please update in order to use the latest features for displaying the terms list.', 'tainacan-interface') . '</p>';
echo '</div>';
}
?>
</div> </div>
</div> </div>
</main> </main>