• Resolved hugodebe

    (@hugodebe)


    Hi, I’m working around to get translated the portfolio link, which is the link for the All Projects Portfolio Page set in the theme options (Page/Post settings tab).

    I’ve manually added the string to the Polylang table with the following, into /virtue_child/function.php :

    // Virtue Portfolio Link translation
    pll_register_string('portfolio_link',$virtue['portfolio_link'],'virtue');

    I’m now able to set the page id for each language, but I’m not familiar yet with the pll_ functions and I can’t find how to properly modify the template to get the string translated in front. See Function Reference in Polylang Documentation: https://polylang.pro/doc/function-reference/

    Into Virtue theme, ‘portfolio_link’ is called, for example, into /templates/content-singleportfolio.php line 7:

    <a href="<?php echo get_page_link($virtue["portfolio_link"]); ?>">

    How can I get the translated string in this case?

    Thanks in advance

Viewing 4 replies - 1 through 4 (of 4 total)
  • As part of the recent update that string should already be translatable in your string translations.

    Kadence Themes

    Thread Starter hugodebe

    (@hugodebe)

    Thanks for the information. I’ve updated the theme and my child theme, and then I was able to set page id for each language into the the Polylang table.

    But I still have a problem regarding the portfolionav previous and next buttons. The navigation goes through the portfolio posts in the current language, but at the end of the list, it continues through the portfolio posts in another language.

    Is there a way to set the loop only for the posts in the current language?

    Thanks in advance

    In premium you can set the posts to go through a specific portfolio type but that option isn’t in free you would have to edit the code.

    Kadence Themes

    Thread Starter hugodebe

    (@hugodebe)

    Thanks for this information.

    If my understanding is right, in Premium the solution would be to create a parent type for each language. Don’t you think the portfolio navigation buttons could act, by default, the same as the post next/previous buttons. I mean going through the post list in the current language and be hidden, respectively, at the end or the bottom of the list? Could that be a feature request?

    I am already a customer but I didn’t really want to install Virtue Premium on that specific project as I don’t need most of the features. I will reconsider that choice or maybe stop using the portfolio navigation for now.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Translate virtue portfolio_link’ is closed to new replies.