Portfolio links untranslated
-
Hello big brain,
I’m almost done building my website. However, while some friends were beta-testing, a small bug arose. But I’m not browsing the web for over two days to find a solution.
I’m using the theme Corpo, which -like several other themes- uses a portfolio plugin.
When browsing the portfolio pages (custom pages) the tree navigation buttons don’t work: <–Previous [Back to portfolio] Next–>
For the previous and next, I’ve found this fix (just add in mqtranslate_hooks.php):
/*************************************************************** * Function qtranslate_next_previous_fix * Ensure that the URL for next_posts_link & previous_posts_link work with qTranslate ***************************************************************/ add_filter('get_pagenum_link', 'qtranslate_next_previous_fix'); function qtranslate_next_previous_fix($url) { return qtrans_convertURL($url); } /*************************************************************** * Function qtranslate_single_next_previous_fix * Ensure that the URL for next_post_link & previous_post_link work with qTranslate ***************************************************************/ add_filter('next_post_link', 'qtranslate_single_next_previous_fix'); add_filter('previous_post_link', 'qtranslate_single_next_previous_fix'); function qtranslate_single_next_previous_fix($url) { $just_url = preg_match("/href=\"([^\"]*)\"/", $url, $matches); return str_replace($matches[1], qtrans_convertURL($matches[1]), $url); }
But the back-up-to-portfolio link stays the same. Also, the portfolio link in the main (header) menu is not translated.
I say translated, but what I really mean is that the language slug (
/fr/
or/nl/
) is not included, so it automatically switches to the default language -English in my case- that doesn’t uses a language slug.This is how the nagivation buttons (previous, up, next) look like in the template:
<div class="project-nav"> <?php echo previous_post_link('%link', __('← Previous','corpo') ); ?> <a href="<?php echo get_post_type_archive_link('corpo_portfolio'); ?>" title="<?php _e('All projects','corpo'); ?>"><i class="icon-th-large"></i></a> <?php echo next_post_link('%link', __('Next →', 'corpo') ); ?> </div>
I assume also that when the corpo_portfolio link is repaired in the navigation, it will also fix it in the main menu.
Any ideas?
Thanks!!
- The topic ‘Portfolio links untranslated’ is closed to new replies.