Reply To: Feature Request

Forums SNAP – WordPress Plugin Forums Feature Request Reply To: Feature Request

#24261
Cihangir
Participant

    I 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);
    }