WordPress.org

Ready to get started?Download WordPress

Forums

Facebook Like Thumbnail
[resolved] FACEBOOK LIKE THUMBNAIL redirection issue with FAST AND SECURE CONTACT FORM (12 posts)

  1. riversatile
    Member
    Posted 2 years ago #

    If as me, you're using FACEBOOK LIKE THUMBNAIL in combination with FAST AND SECURE CONTACT FORM, and you're not seeing redirection after sending your form on your contact form (contact page), here is the solution below.

  2. riversatile
    Member
    Posted 2 years ago #

    To make "Fast and Secure Contact Form" compatible with "Facebook Like Thumbnail", do the modifications on the file "facebook-like-thumbnail.php" below.

    Instead of :

    if ( is_single() is_page() ) {
    if ( function_exists( ‘has_post_thumbnail’ ) ) { // compatibility with themes who doesn’t support featured thumbnails
    if ( has_post_thumbnail( $posts[0]->ID ) ) {
    $thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $posts[0]->ID) );
    $thumb = $thumb[0]; // take the URL from the array
    $thumb_set = true;
    }
    }
    }

    PUT this (just remove is_page() ) :

    if ( is_single() ) {
    if ( function_exists( ‘has_post_thumbnail’ ) ) { // compatibility with themes who doesn’t support featured thumbnails
    if ( has_post_thumbnail( $posts[0]->ID ) ) {
    $thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $posts[0]->ID) );
    $thumb = $thumb[0]; // take the URL from the array
    $thumb_set = true;
    }
    }
    }

    And to finish PUT this :

      if ( is_page() ) {
      return;
      }

    just after function fb_like_thumbnails(), like that :

    function fb_like_thumbnails()
    {
    global $posts;
    $options = get_option(‘fb_like_thumbnail’);
    $default = $options['default'];
    
    if ( is_page() ) {
    return;
    }

    This will stop (do a return) the function if webbrowser detect a page is loading
    So, from now, function fb_like_thumbnails() is not loaded for all your pages.
    You can choose which page are affected or not by using this :

    function fb_like_thumbnails()
    {
    global $posts;
    $options = get_option(‘fb_like_thumbnail’);
    $default = $options['default'];
    
    if ( is_page( '42' ) ) {
    return;
    }

    In this example, the page that has the ID 42 will not load the function fb_like_thumbnails(), so the contact form will redirect users correctly after they sent the form ^_^

  3. Mike Challis
    Member
    Posted 2 years ago #

    Thanks for the information.

    I use Share and Follow and have not had any problems

  4. riversatile
    Member
    Posted 2 years ago #

    You can also use only this script into your functions.php file (in your theme folder) :
    Don't forget to uninstall Facebook Like Thumbnail extension !

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Just replace the URL "http://www.yoursite.com/images/my-default-image.jpg" by the path of your default image ;)

    Cheers

  5. Ashfame
    Member
    Plugin Author

    Posted 2 years ago #

    So nice of you to just copy paste the v0.1 of the plguin

  6. riversatile
    Member
    Posted 2 years ago #

    So nice of you to just copy paste the v0.1 of the plugin

    to solve an issue !

    If we're using Facebook Like Thumbnail as an extension (in addition of "Fast and Secure Contact Form"), the contact page fails !

    It's strange, but it's like that ;)

  7. abcd
    Member
    Posted 2 years ago #

    I have install facebook like thumnail plugin and now i want that when i click this like button we get any image which i want to diaplay pls reply

  8. abcd
    Member
    Posted 2 years ago #

    I have a blog with some posts, and each post has a embedded Facebook like button. Pressing the button opens a dialog so my visitors can share the post on Facebook with a comment.
    When sharing, however, the image selected by Facebook is a generic mail icon and not the post thumbnail.

    How can I control the image that is used when sharing?

  9. riversatile
    Member
    Posted 2 years ago #

    Hi,

    I think it depends the way your post/page has been created.
    This code goes looking the 1st image of the post/page, then it displays it as shared link into facebook.

    So if you 1st image in your post is not the post thumbnail, it doesn't display the proper image !

    Check your posts/pages and also CSS styling of posts/pages

  10. abcd
    Member
    Posted 2 years ago #

    hi i want to use wow slider in header in my site what code to write in what code to write in php files pls reply

  11. abcd
    Member
    Posted 2 years ago #

    Hi my website is not looking same in all browsers can anybody tell me there is any plugin for different browser compatibility?

  12. riversatile
    Member
    Posted 2 years ago #

    No plugin for that...

    You have to check errors and fix them one by one, by checking if the fix not causing other issues.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic