# Missing options for get\_terms functions

**URL:** <https://forum.pinegrow.com/t/missing-options-for-get-terms-functions/4839>\
**Category:** Pinegrow Theme Converter\
**Created:** [January 15, 2021, 2:52am UTC](https://forum.pinegrow.com/t/missing-options-for-get-terms-functions/4839 "2021-01-15T02:52:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sirojuntle](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/sirojuntle/32/2328_2.png) [@sirojuntle](https://forum.pinegrow.com/u/sirojuntle)\
**Post date:** [January 15, 2021, 2:52am UTC](https://forum.pinegrow.com/t/missing-options-for-get-terms-functions/4839/1 "2021-01-15T02:52:03Z")

</div>

I’m trying to query taxonomies with custom fields values, just like:

> <https://wordpress.stackexchange.com/questions/231212/get-term-by-custom-term-meta-and-taxonomy>

But the only option in Pinegrow is the Smart Action - Site Tags & Categories - which doesn’t allow to more advanced queries.

Maybe we could add our own $args into queries to quickly customize it while we don’t have a full UI for it.

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [January 15, 2021, 12:18pm UTC](https://forum.pinegrow.com/t/missing-options-for-get-terms-functions/4839/2 "2021-01-15T12:18:01Z")

</div>

Hey @sirojuntle,  
I’m running out right now, so I’ll write-up more later, but you can search on meta and taxonomies.  
Add a loop, give it a custom name.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/0/09bb8f515f94a0effed4bb7a1deb93ae0dda26e7.png)  
Scroll down for Taxonomy  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/8/83a8133ddf463f208b782c7c4309fc7a4202cd40.png)  
or meta  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/4/43e9c5faf195f2308c1302fb62e4ffb7dc6fcec9.png)  
If you give me specifics I can help more.  
Bob

---

<div class="post-metadata">

**Author:** ![sirojuntle](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/sirojuntle/32/2328_2.png) [@sirojuntle](https://forum.pinegrow.com/u/sirojuntle)\
**Post date:** [January 15, 2021, 2:10pm UTC](https://forum.pinegrow.com/t/missing-options-for-get-terms-functions/4839/3 "2021-01-15T14:10:39Z")

</div>

Hi, RobM! Thanks for replying!

I have made some tests and I think I can’t use that.

It would need some work around because I’m trying to query Categories based in Custom Fields. Then in my loop I expect to work with the Taxonomy object, not the Post object. My current solution is:

```
$args = array(
  'meta_query' => array(
      array(
         'key' => 'crb_category_sticky',
         'value' => 'yes',
         'compare' => '='
      )
  ),
  'taxonomy' => 'category',
  );
  $terms = get_terms( $args );

foreach( $terms as $term ) :
   $term->name;
   carbon_get_term_meta( $term->term_id, 'crb_category_subtitle' );
endforeach;

```

I believe your proposed solution would work perfectly if there is a version with WP\_Term\_Query (or get\_terms) instead of WP\_Query.

Any thougths?

Thanks again.

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [January 15, 2021, 10:01pm UTC](https://forum.pinegrow.com/t/missing-options-for-get-terms-functions/4839/4 "2021-01-15T22:01:54Z")

</div>

Hey @sirojuntle,  
Feeling dense today - I’ve thought about this a little and feel like this should be doable, but the only thing I can come up with right now is to add in a custom PHP block.  
Sorry,  
Bob

---

<div class="post-metadata">

**Author:** ![sirojuntle](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/sirojuntle/32/2328_2.png) [@sirojuntle](https://forum.pinegrow.com/u/sirojuntle)\
**Post date:** [January 16, 2021, 2:47am UTC](https://forum.pinegrow.com/t/missing-options-for-get-terms-functions/4839/5 "2021-01-16T02:47:07Z")

</div>

Hello, @RobM, it is ok!

I’m already working with a function and PHP code.

By the way, how to use the PHP block?

I’m stuck in ‘PHP Code’. It says “Right click to insert a PHP Block” but it does nothing!

I’m pasting code into that single text field, it works, but is hard to read.

And I’m having some problems with `<scripts>` tags, I will do some more research in the forum and in my project and I will open another topic.

Thank you again!

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [January 16, 2021, 1:44pm UTC](https://forum.pinegrow.com/t/missing-options-for-get-terms-functions/4839/6 "2021-01-16T13:44:25Z")

</div>

The subtext is a little confusing. Essentially what it means is that if you have a whole block of code, right-click on the page to insert a block of PHP and then edit using one of the code editors (built-in or external).

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/1/17abec32f5a72ada2b1bc9cb3119161519e31110.png)  
and then,  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/a/aafa63357fa98f15ae5ffa4305938d2c31fb00ac.png)  
and then  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/f/f2595a437c669eba47ec505bc2f3aaf875cc4b21.png)

---

<div class="post-metadata">

**Author:** ![sirojuntle](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/sirojuntle/32/2328_2.png) [@sirojuntle](https://forum.pinegrow.com/u/sirojuntle)\
**Post date:** [January 18, 2021, 3:06pm UTC](https://forum.pinegrow.com/t/missing-options-for-get-terms-functions/4839/7 "2021-01-18T15:06:06Z")

</div>

Hi, @Robm!

I didn’t expect you to answer on Saturday. Thanks for fast replying.

I don’t have all those options when I right click my html elements.

![imagem_2021-01-18_120340](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/b/b6a0a0e729f75efdcd339d4ec4de717557278647.png)

Am I missing some configuration or add-on?

I’m using Wordpress Theme Builder 1.3

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [January 18, 2021, 8:10pm UTC](https://forum.pinegrow.com/t/missing-options-for-get-terms-functions/4839/8 "2021-01-18T20:10:56Z")

</div>

Sorry, didn’t realize you were using the theme builder. I don’t think it has a provision for adding in code within the program. I guess you will have to edit the exported PHP files. I guess this is a feature of the full Pinegrow WordPress program. The right-click comment needs to be addressed.  
Bob

---

<div class="post-metadata">

**Author:** ![sirojuntle](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/sirojuntle/32/2328_2.png) [@sirojuntle](https://forum.pinegrow.com/u/sirojuntle)\
**Post date:** [January 18, 2021, 11:22pm UTC](https://forum.pinegrow.com/t/missing-options-for-get-terms-functions/4839/9 "2021-01-18T23:22:22Z")

</div>

Hello,

Is there no intention to add the feature in the future? It would be especially helpful to adjust pagination in custom queries in $args blocks.

Other than that, thank you again for the support and I’m liking very much the software, I think I could do all tasks I tried sucessfully!
