› Forums › SNAP – WordPress Plugin Forums › Feature Request
- This topic has 3 replies, 1 voice, and was last updated 11 years ago by Cihangir.
- AuthorPosts
- October 2, 2013 at 9:05 am #24249CihangirParticipant
Most of wordpress users / developers are using custom fields in their posts to adjust things. It can be nice if we have ability to choose the custom field to use as “description” to post social networks.
October 2, 2013 at 9:59 am #24256See the %CF-CustomFieldName% tag
October 2, 2013 at 10:38 am #24261CihangirParticipantI solved my requirement as follows.. i edited the nextscipts_snap.php and added the following conditional lines into nsFormatMessage function.
It is working properly but the problem is i have to update the code each time i updated the script.
I hope there will be a feature for custom fields soon.
if (preg_match('%MYMSG%', $msg)) {
$recipe = get_post_meta($postID, 'mycustomfield', true);
if ($recipe!="") $excerpt = $recipe; else $excerpt= "";
$excerpt = nsTrnc(strip_tags(strip_shortcodes($excerpt)), 300, " ", "..."); $msg = str_ireplace("%MYMSG%", $excerpt, $msg);
}
October 2, 2013 at 10:39 am #24262CihangirParticipantAhh sorry didnt see your message 🙂
I was focused and my window was open.. great feature.. every cent worths for SNAP
- AuthorPosts
- You must be logged in to reply to this topic.