Hello again,
As shown in this support thread:
https://toolset.com/forums/topic/redirect-a-taxonomy-to-a-static-wordpress/
After adding the following code in the functions.php file:
function custom_post_taxonomy_fun( $atts ) {
extract(shortcode_atts( array(
'site_url' => home_url(),
'taxonomy_slug' => '',
'taonomy_name' => '',
), $atts ));
$content = '';
if($taxonomy_slug != '' && $taonomy_name != '') {
$tax_slug_array = explode(',', $taxonomy_slug);
$tax_name_array = explode(',', $taonomy_name);
for($i=0; $i < count($tax_slug_array); $i++) {
if($i != 0)
$content .= ', ';
$content .= ''.$tax_name_array[$i].'';
}
}
return $content;
}
add_shortcode( 'custom_post_taxonomy', 'custom_post_taxonomy_fun' );
and the following shortcode in the content template:
[custom_post_taxonomy taxonomy_slug="[wpv-post-taxonomy type='autor' format='slug']" taonomy_name="[wpv-post-taxonomy type='autor' format='name']" site_url="hidden link"]
everything works perfect in the Spanish version.
But now that I'm starting to translate the web into the German language with the WPML plugin, I have a new question related to this topic.
How can I make this code fragment work in the translated version of the web with WPML and not show a 404 error when clicking on the name of the author?
In the following link an example of the Spanish version working perfectly (when you click on the name of the author it redirects to its corresponding page):
hidden link
In this other link an example of the error 404 that is shown when clicking the name of the author (version translated into German):
hidden link
As a reference we take Alexander von Humboldt as an author already translated:
hidden link
hidden link
Thank you very much in advance!
Best regards,