Issue with Featured Products wigdet and WPML translation

Josh

21 Feb, 2013 11:40 AM

There is an issue with the featured products widget that only displays it in one language. The other widgets translate properly when switching between languages.

I fixed it by copying part of the featured products code into the random products code. You might considered looking into getting that fixed for future releases.

  1. Support Staff 2 Posted by Jeff on 21 Feb, 2013 04:18 PM

    Jeff's Avatar

    Not going to fix much … without a little elaboration. 🙂

    Care to share what you changed? (You can paste code in between triple @ sign’s, one 3 set to start and one 3 set to end)

  2. 3 Posted by Josh on 22 Feb, 2013 03:09 AM

    I didn’t change any lines of code so there is nothing to post. Instead I just mix and matched between two of the widgets. I’ll describe the process in a little more detail for you.

    The two widgets I’ll be working with are: featured-products.php and random-products.php.

    1.) I created a duplicate of random-products.php
    2.) Using the new duplicated version I changed the settings so it’s a new widget called promoted-products.php
    3.) I copy and pasted the query and display section from featured-products.php and pasted it over that section in the newly created promoted-products.php widget I created.

    The new widget I created does the same thing as the current featured products widget, but it works with WPML translation. I’ve attached a copy of the new widget I created for reference.

Reply to this discussion

Internal reply

Formatting help or Preview

Attached Files

You can attach files up to 10MB

If you don’t have an account yet, we need to confirm you’re human and not a machine trying to post spam.