Support » Plugins and Hacks » Image Path from custom Field

Image Path from custom Field

  • Hi,

    my pictures are not attached to the posts, but the path is stored in a custom field named “image”. how can these images be used for posting on facebook?

    and is there a way to deactivate displaying text from the post completely? my posts are just a shortcode which doesn’t get “translated” no matter which option is de-/activated, so i just want to switch off posting the post text to fb at all.



Viewing 2 replies - 1 through 2 (of 2 total)
  • Somewhere in forum mentioned below is an example how to use custom field values as image URLs.

    Almost anything can be accomplished by a little programming using the filters and hooks Add Link to Facebook provides, but either you have to do this yourself or find someone who can do this for you.

    For your next support question or follow up on this question, please go here: http://forum.faircode.eu/

    great thx, i found the answer here:


    just a quick howto for those with a similar problem:

    add the following code to your functions.php (or use a plugin like “Make it Yours” and add it to the custom functions), be shure to enter the right value for “YOUR-CUSTOM-FIELD-NAME-HERE”

    ‘add_filter(‘al2fb_picture’, ‘al2fb_custom_picture’, 10, 2);
    function al2fb_custom_picture($picture, $post) {
    $post_image = get_post_meta($post->ID, ‘YOUR-CUSTOM-FIELD-NAME-HERE’, true);
    return (empty($post_image) ? $picture : $post_image);

    that’s it!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Image Path from custom Field’ is closed to new replies.