No results found. Try again with different words?

Search must be at least 3 characters.

ph_website_publish_thread

This action runs after a new website thread is published.

Parameters

  • $post_ID – (int) Post ID.
  • $thread – (WP_Post) Post object for the thread.

Examples

<?php
function my_project_created_send_email( $post_id, $thread) {
	$thread_url = get_permalink( $post_id );
	$subject = 'A new conversation has been started.';

        // get webpage id (parent_id)
	$webpage_id = get_post_meta( $post_id, 'parent_id', true);

	$message = " A new conversation has been started on "  . get_the_title($webpage_id) . ". \n\n";
	$message .="View it" . $post_url;

	// Send email to admin.
	wp_mail( '[email protected]', $subject, $message );
}
add_action( 'ph_website_publish_thread', 'my_project_created_send_email', 10, 3 );

Was this article helpful?


Did not find a solution? We are here to help you succeed.

ph_website_publish_thread

This action runs after a new website thread is published.

Parameters

  • $post_ID – (int) Post ID.
  • $thread – (WP_Post) Post object for the thread.

Examples

<?php
function my_project_created_send_email( $post_id, $thread) {
	$thread_url = get_permalink( $post_id );
	$subject = 'A new conversation has been started.';

        // get webpage id (parent_id)
	$webpage_id = get_post_meta( $post_id, 'parent_id', true);

	$message = " A new conversation has been started on "  . get_the_title($webpage_id) . ". \n\n";
	$message .="View it" . $post_url;

	// Send email to admin.
	wp_mail( '[email protected]', $subject, $message );
}
add_action( 'ph_website_publish_thread', 'my_project_created_send_email', 10, 3 );

Leave a Reply

Your email address will not be published. Required fields are marked *

LET’S GET STARTED

Ready to Give It a Try?

Start Your Free 14-Day Trial Now. No Obligation. No Reason Not To.

Trial Icon

14 Days Free Trial

Experience Our Platform Risk-Free

Docs Icon

Documentation

Articles that cover common questions

24/7 World Class Support Team

Friendly Support

Reach Out – We’re Here to Help

Scroll to Top