WordPress: Export/Import Yoast meta title & description to custom taxonomy

I want to export the Yoast meta title description from a custom taxonomy with the WP All Export. Unfortunately there is no direct way with the plugin to do that.

There is an extra WP All Export addon for Yoast but it doesn't work for custom taxonomies.

I tried to use a custom function in the export to get the title and description. But my function doesn't work either. Im not sure why.

Here's my current function:

function yoast_wpseo_title($value) {
    
    $my_yoast_wpseo_title = WPSEO_Taxonomy_Meta::get_term_meta($this-term, $this-term-taxonomy, 'title');
    if( $my_yoast_wpseo_title ){
        return $my_yoast_wpseo_title;
    } else {
        return '';
    }
    
}

I'm using the function in the function editor within the export. Like this:

Is there anything that I'm missing? Or isn't it possible that way?

Maybe there's another option to export these fields (and import them later)?

Topic plugin-wp-seo-yoast php taxonomy custom-taxonomy import Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.