Oh! You know what! I think it’s your permalinks.
In your WordPress backend, go to Settings > Permalinks and change the value to anything other than Plain and then click Save Changes. Refresh your product page and see if the product title appears then.
As for the image, it looks like you’re trying to display it as well as putting it in the email. In that case, you’ll want a hidden field to pass on the image’s URL into the email as well as a custom form tag to display your content.
In the form template, you’ll want something like this:
[dynamic_hidden featured_image "CF7_get_attachment size='full'"]
[precisionset_image]
The first line is the URL that you’ll use in the email, the second is a custom form tag you’ll create in the next step.
In your child theme’s functions.php file or in a code snippet, plop this in:
/**
* Add custom form tag to Contact Form 7
*
* @return void
*/
function precisionset_add_cf7_shortcodes() {
wpcf7_add_form_tag(
array('precisionset_image'), // Form tag
'precisionset_image_shortcode', // Callback
array('name-attr' => false) // Features
);
}
add_action('wpcf7_init', 'precisionset_add_cf7_shortcodes');
/**
* Form Tag Handler for Image Display
*
* @param WPCF7_FormTag $tag Current Contact Form 7 tag object
*
* @return string HTML output of the form tag
*/
function precisionset_image_shortcode($tag) {
// Use DTX helper function to get the attachment id
$featured_image_id = wpcf7dtx_get_attachment(array(
'return' => 'id'
));
// Bail if not found
if(!$featured_image_id) return '';
// Return the image HTML using WordPress core function
return wp_get_attachment_image($featured_image_id, 'thumbnail');
}
This makes it so the featured image is displayed where you place [precisionset_image]
in your form template.
Now over in your Mail template, do what you were trying to do in the Form template but use your hidden field like so:
<img src="[featured_image]" alt="[product_name]" >
Let me know if that works!