wp mail – Send an email base in a taxonomy term

I would like to receive an email if a personalized publication is created / updated if it has a custom taxonomy finished.

Here is the CPT, taxonomy and term.

  • Type of personalized publication: call
  • Custom Taxonomy: call_type
  • Custom term: in progress

The following code works fine just to send an email based on the CTP.

//  Add Hooks for Email 
add_action('new_to_publish', 'send_emails_on_new_event');
add_action('post_updated', 'send_emails_on_new_event');
function change_mail_from() {
    return "noreply@abc.com";
add_filter ("wp_mail_from", "change_mail_from");
function change_from_name() {
    return "ABC";
add_filter ("wp_mail_from_name", "change_from_name");
function wpse27856_set_content_type(){
    return "text/html";
add_filter( 'wp_mail_content_type','wpse27856_set_content_type' );
//  Send emails on event publication

function send_emails_on_new_event($post_id)
    global $post;
    $post           =   get_post($post_id);
    $post_id        =   $post->ID;
    $post_type      =   'call'; //post, page, attachment or whatever other CPT you may have
    $post_term      =   ''
    $author         =   get_userdata($post->post_author);
    $mf_area        =   $author->mf_area;
    $author_mail    =   $author->user_email;
    $author_name    =   $author->mf_d_name;
    $ac_name        =   get_post_meta( $post_id, '_call_8', true);
    $ac_email       =   get_post_meta( $post_id, '_call_9', true);
    $rc_email       =   get_post_meta( $post_id, '_call_12', true);
    $rc_name        =   get_post_meta( $post_id, '_call_13', true);
    $mtm_email      =   'support@abc.com';
    $emails         =   "$author_mail, $ac_email, $mtm_email"; //If you want to send to site administrator, use $emails = get_option('admin_email');
    $title          =   wp_strip_all_tags(get_the_title($post_id,));
    $url            =   home_url();
    //  Email lay out
    ob_start(); ?>


Ref number has been created.

Log in to track this call.


Can someone help me make the script also work for the terms?

Why doesn't Google or other major search engines have a document-document model to perform searches like the term document model they already have?

On Google or any other important search engine, you can enter a search query and retrieve the search results. This is a model of term document. Why is there no document-document model in which you enter a link to a web page and then return a list of the most similar web pages?

queue – Sort a view in a taxonomy term with entity

I am trying to use a feature queue in a taxonomy to create a new sort order for an existing view. But I have trouble setting it up.

I created a fake website with a fantasy role-playing game theme. I have a "Monster" content type with a taxonomy term "difficulty."

enter the description of the image here

Monsters can have several difficulty tags, but I created an entity queue for the subset of tags that I want to sort:

enter the description of the image here

Finally, I created the view for monsters, with what I think are the right relationships to join in the queue of entities for classification. Starting with the Monster content type, I added a relationship to the Taxonomy term Difficulty, then another relationship for the Monster Difficulty queue.
enter the description of the image here

Finally, I added the entity entity as the first classification criteria:

enter the description of the image here

However, the results of the view are still being sorted in the title field, "Name", which means that the classification order of the entity is not met or respected:

enter the description of the image here

How do I classify a view based on a taxonomy entity queue?

Here are the configuration export ymls of those different files from a vanilla installation: https://pastebin.com/r4A94QJ5

Does this series diverge in the nth term test?

lim (n -> infinity) = n * 2 ^ n

I wonder if it can be shown that the limit of the previous series diverges using the nth term divergence test.

views: contextual filter with any term ID

Sorry, I wasn't trying to be lazy. My point of view was based on an entity, rather than content, as a node. So I was not seeing the option "It has a taxonomy term id" in the list of contextual filters. I only saw specific taxonomy fields as options. I discovered that core does not offer that by default for other entities.

I found a module that provided the functionality I was looking for:

I will also say that this module seems to expect entities to have packages. If not, there is an error. I will send a patch soon.

Hopefully that helps others. I will take my 2 negative votes and go home now.

(I will also include this problem link to have the functionality in the kernel: https://www.drupal.org/project/drupal/issues/1040786)

Issue filed at taxonomy term when choosing term

I have a taxonomy term with the name of cars and its field is within the type of gasoline integer with name, and I add the type of content and add the taxonomy term field in it.
what I need is that when I choose the taxonomy from the list I get the integer value of the gas field to use it in the mathematical field.

I need a good wordpress designer for long term projects


I have a project and will require several WordPress websites. It's not just as if you could create one, but there will be many small websites. You need the fastest and cheapest way to get as many WordPress websites as we can.

views – The exposed autocomplete filter has TID with taxonomy term

I created a view from taxonomy terms of different country names. I added an exposed filter to allow the user to enter the country, but when the user selects the country, it automatically adds the taxonomy identification after the name.

I've tried several things, from hooks to jQuery, I can't seem to understand how to remove the TID. Please notify.

enter the description of the image here

How to search Google for a term with any suffix?

I am trying to find German laws on occupation. The German word for "occupation" appears as "besatz …" with any possible end. I tried to add {*} behind the root term {besatz}.

But the search with {besatz *} does not work (only 61 results)

site:site:gesetze-im-internet.de besatz*

… because {besatzung} produces about 666 results

site:gesetze-im-internet.de besatzung

How to load a taxonomy term with upper and lower case?

I used this

$this->termStorage()->loadByProperties(('name' => 'test'));

I have two terms: Test, test.
I want to get only one: test