• Resolved Riversatile

    (@riversatile)


    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.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Riversatile

    (@riversatile)

    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 ^_^

    Thanks for the information.

    I use Share and Follow and have not had any problems

    Thread Starter Riversatile

    (@riversatile)

    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

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

    Thread Starter Riversatile

    (@riversatile)

    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 😉

    abcd

    (@vandana-hemnani)

    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

    abcd

    (@vandana-hemnani)

    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?

    Thread Starter Riversatile

    (@riversatile)

    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

    abcd

    (@vandana-hemnani)

    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

    abcd

    (@vandana-hemnani)

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

    Thread Starter Riversatile

    (@riversatile)

    No plugin for that…

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

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘FACEBOOK LIKE THUMBNAIL redirection issue with FAST AND SECURE CONTACT FORM’ is closed to new replies.