WordPress.org

Ready to get started?Download WordPress

Forums

Transposh WordPress Translation
[resolved] [Plugin: Transposh - translation filter for wordpress] How to obtain correct permalink for social bu (5 posts)

  1. mediopirzel
    Member
    Posted 2 years ago #

    Hi people.

    I'm trying to add o facebook like button in my wordpress site with this code:

    <iframe src="http://www.facebook.com/plugins/like.php?href=
    <?php echo rawurlencode(get_permalink()); ?>
    &layout=standard&show-faces=true&width=450&action=like&font=arial&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" id="facebook-like"></iframe>

    This code generates a link only to default transposh language. Is there a way to generate the correct link for each language?

    So if someone is visiting our site in english and likes our page, a message written in spanish is published at his facebook page.

    http://wordpress.org/extend/plugins/transposh-translation-filter-for-wordpress/

  2. Ofer Wald
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    You need to use the rewrite url function in the transposh utils.php file

    Good luck

  3. mediopirzel
    Member
    Posted 2 years ago #

    Done!!
    This is the code:

    In your functions.php:
    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    Then, you can use this functions on your theme:

    _the_permalink();
    _get_permalink();

    Notice the symbol "_" at the begining of the function.

  4. FondueDoneRight
    Member
    Posted 2 years ago #

    Your code was edited out. Would you mind trying to post it again please?

  5. Ofer Wald
    Member
    Plugin Author

    Posted 2 years ago #

    I have his code somewhere, contact me via the contact form on transposh.org

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic