› Forums › SNAP – WordPress Plugin Forums › Problem to configure Featured Image
- This topic has 1 reply, 1 voice, and was last updated 11 years, 9 months ago by NextScripts.com.
- AuthorPosts
- February 14, 2013 at 7:23 pm #8374SebParticipant
Hi,
I have a problem to configure a featured image stored in a custom field by my theme. The post meta is “bigimage” and contains the complete path to the image (including https://…jpg)
So I put bigimage into the Cutom field name.
I’m using WordPress 3.5.1 and SNAP 2.6.3 (so last versions)
When I publish to my Facebook account, I get this error (the post is published on facebook, but without any image) :
Warning: trim() expects parameter 1 to be string, array given in /homepages/12/d382362825/htdocs/www/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/nxs_functions.php on line 78
At first, I didn’t modify the file in SNAP, line 78 is “if (isset($options[‘featImgLoc’]) && $options[‘featImgLoc’]!==”) { $imgURL = trim(get_post_meta($postID, $options[‘featImgLocPrefix’], true)).trim(get_post_meta($postID, $options[‘featImgLoc’], true));”
As I didn’t specify a custom field image prefix, I tried to remove the first trim(…). Doing this I don’t have the error about the trim(), but I still don’t see the image in the facebook post.
Did i miss something ?
Thanks for your help
February 15, 2013 at 1:56 pm #8390It should be
$imgURL = trim($options[‘featImgLocPrefix’]).trim(get_post_meta($postID, $options[‘featImgLoc’], true));
Will be fixed in the next release.
- AuthorPosts
- You must be logged in to reply to this topic.