• Resolved xuso_pg

    (@xuso_pg)


    Hi, I need extract a data into a function but i cant.
    My code is:

    function fb_like_thumbnails()
    {
    global $posts;
    $default = ‘https://www.vidalowcost.com/wp-content/themes/Elements/img/logo_face.png’;
    $content = get_post_meta($post->ID, “cuadrado”, true);

    if (is_single()) {
    $thumb = $content;
    }
    else
    $thumb = $default;

    echo “<link rel=\”image_src\” href=\”$thumb\” />
    }

    The bold text is the problem don′t return nothing, and I need this value, because is my select image for the singles posts.

    Can you helpme? thanks

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help in a function’ is closed to new replies.