Email WP post favorite – please help
-
Hi
There is a plugin that lets you mark posts as favorite http://wordpress.org/extend/plugins/wp-favorite-posts/, the thing is that I want to be able to email this list to the website owner using gravity form.
Others have wrote that you can use this code but it’s not working
Here is another post where they are trying to solve this issue http://wordpress.org/support/topic/plugin-wp-favorite-posts-mailing-favourite-list-to-site-owner?replies=22
<?php // Get an array containing the favorite post ID's: $favs = wpfp_get_users_favorites(); // Use the ID's in the array to get the post titles. Construct a string with the titles of the favorited posts: $message = "Here are your favorite posts:\n"; foreach ( array_keys($favs) as $favID) { $message .= get_the_title($favID) . "\n"; } // Create array of values to pass on to the form embed function. Map $message to 'message_body' parameter selected earlier in the form editor $field_values = array ( 'message_body' => $message); // Embed the form with the $field_values array pre-populating it. gravity_forms( 1, true, true, false, $field_values, true); ?>Can some help me out to make this actually work?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Email WP post favorite – please help’ is closed to new replies.