Separate "Incoming Terms" for every Related Term field.

This topic is: resolved
Viewing 12 posts - 1 through 12 (of 12 total)
Author Posts
June 10, 2013 at 9:41 pm #3178
Post count: 43

Since I have posted to the [Resolved] topic, I post a new topic.

It is a continuation of this topic.

Can I separate for every field similarly by “incoming_terms” in custom taxonomy (at taxonomy-[custom taxonomy].php template )?

ex. $wf->the_term->incoming_terms(“for=field_set.field”)


June 10, 2013 at 10:35 pm #3180
Post count: 207

Hi there. You should be able to do this yes. Have you tried to do this in the taxonomy-[tax_name].php template? Can you describe your field setup in a bit more detail?

Note that, if you want to use a standard WordPress “loop” in that template, you can also add “query=1” to the arguments before the standard loop code, and that should hopefully then show the correct posts.


if (have_posts()) : while (have_posts()) : the_post();



June 11, 2013 at 12:34 am #3181
Post count: 43

I explain something to do in detail.

I want to make the flexible relationship for every keyword using custom taxonomy.

By the category of wordpress, I cannot set two or more parents to one keyword. Then, I set “Related Terms” to custom taxonomy, and I want to be able to set two or more parents to one keyword.

I drew the figure.

1 ) Input a parent keyword into the “parent field” of each keyword.
2 ) Display the taxonomy-keyword.php of a parent keyword. The keyword which makes itself parents using “MEOW_Term :: incoming_terms” is displayed.
3 ) Add some values to the child field using “MPFT_RelatedTerm :: value_for_set.”

Can I realizable?


June 11, 2013 at 9:12 am #3182
Post count: 207

Wow, thanks for that. So do you actually need to do step 3, and store the child relationship? The children of a keyword are defined by the incoming_terms query right?

You can certainly store the reverse relationship if you want to, but it means you need to keep them in sync, which is probably a little tricky.

By the way, the value_for_set method is not intended to be called directly, it basically enables the fields to be set via direct assignment. Something like this should be possible:

June 11, 2013 at 10:48 am #3184
Post count: 43

Thank you for the additional method to the field.

And I want to save each child-parent relationship at DB for other purposes.
However, I was not able to separate and display on the field by “$wf->the_term->incoming_terms(“for=field_set.field”).”

Although the following codes were written at taxonomy-keyword.php, it did not display.

custom taxonomy: keyword
field set: relationship
field(Related Term): parent
field(Related Term): child


June 11, 2013 at 12:35 pm #3185
Post count: 207

Okay thanks. I’ll need to setup a test environment and find out why that’s not working.

June 11, 2013 at 1:37 pm #3186
Post count: 43

Thank you!

June 12, 2013 at 6:39 pm #3196
Post count: 207

Hey, I’ve just looked into this and realised that the code in is not quite right.

The first argument for incoming_terms is actually the taxonomy name. Have you tried making the first argument in line 12 and 18 the string “keyword” to specify the keyword taxonomy?

June 13, 2013 at 1:04 am #3198
Post count: 43

I referred to, and described it.

How should I specify the first argument in this case?

June 13, 2013 at 10:07 am #3200
Post count: 207

Hi. Here is the reference in the class documentation:

It should be something like this:

Let me know if that works. Thanks

June 13, 2013 at 10:29 am #3201
Post count: 43

I was able to display for every field!

“Incoming” is a wonderful function.

Thank you very much!

June 13, 2013 at 10:34 am #3202
Post count: 207

Great. I’m really glad that does actually work!

The “Incoming” functions are really nice – the queries running behind them are quite difficult, so it’s good that you don’t need to worry about that.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.

Latest From the Blog

MasterPress 1.4.0 is now available

6th May 2024

This release has a focus on improving compatibility with PHP 8.2. The introduction of inheritance validation to PHP produced a lot of warnings when using MasterPress with PHP 8.2. I have updated most of the problematic code – but some code would have broken in previous PHP versions, so I have temporarily disabled inheritance validation… 

Plugin Requirements

MasterPress requires a minimum of WordPress version 4.9, MySQL 5.6, and PHP version 5.6.20.

We also recommend that PHP is configured to use a memory limit of 64MB per request (128MB may be required for sites with higher complexity).

This plug-in is not compatible with the hosted service.

Three AM