WordPress.org

Ready to get started?Download WordPress

Forums

Qtranslate Slug
[resolved] Global $post variable being replaced by _get_page_link() (3 posts)

  1. jmlfernandez
    Member
    Posted 1 year ago #

    Hey,

    I just noticed some issues after using WooCommerce + qTranslate + qTranslate-slug + qTML: Breadcrumbs on WooCommerce product pages were completely off, also, some (theme-specific) individual page/post related settings were not applied as they should.

    Disabling qTranslate-slug proved to solve those, so after scouring the code for a while I discovered the exact reason: global $post variable is replaced every time _get_page_link() is called, line 1293 @qtranslate-slug.php.

    I just created a temp variable where I stored the "old" one at the start of the function, only to restore it again before returning. May not be an ideal solution, but hey, now it works as a charm.

    Regards.

    http://wordpress.org/extend/plugins/qtranslate-slug/

  2. Carlos
    Member
    Plugin Author

    Posted 1 year ago #

    Well if you are using an ecommerce plugin like woocommerce i doesn't reccommend to use qtranslate and qtranslate-slug because they are not compatible. Try to use WPML...

  3. Carlos
    Member
    Plugin Author

    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.