Subscribe2 and Custom Fields
-
Why can not I select from the database meta data to be inserted in the message body?
example1 subscribe2.php in function substitute($string = ”, $post_ID):
... $sent = get_post_meta($post_ID, 'my_meta', true); ... $string = str_replace("{TITLE}", stripslashes($sent), $string); ...
$post_ID passed to the function. Dont work, $sent is empty
example2 subscribe2.php in function substitute($string = ”, $post_ID):
... $results = $wpdb->get_results("SELECT meta_key, meta_value FROM wp_postmeta WHERE post_id = $post_ID"); foreach ($results as $result){ ...... } ... $string = str_replace("{TITLE}", stripslashes($sent), $string); ...
Dont work, $sent is empty
selecting only: edit_lock, s2mail, _edit_last
Why can not retrieve other metadata?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Subscribe2 and Custom Fields’ is closed to new replies.