Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
TheNewGuy16
@TheNewGuy16
I am trying to figure out how to return the value of the radio button that is checked the normal way isn't returning anything
TheNewGuy16
@TheNewGuy16
Anyone i killing me I just need the value of a radio but but the standard get_post_meta is not return in any thing
Justin Sternberg
@jtsternberg
@TheNewGuy16 hmm you'll need to provide more info
what's the field config array?
and are you sure you have post ID when you're calling get_post_meta
and what is "selected" in the admin for that radio?
Noel McG
@noelmcg
Hi Justin, if possible, I just need a bit of a push in the right direction. On 'pre_get_posts' I am trying to change the query order by a meta_key. I appreciate that this is possible. How would you do this with a 'group field' though? Is it pushing things a bit too far trying to do this?
Justin Sternberg
@jtsternberg
@noelmcg yah, group fields are not meant to be queried by, and will cause significant performance issues if attempted. What's the goal?
Noel McG
@noelmcg
Had a feeling that might be the case, cheers for the heads up though. A little complicated to explain: A product can have a legend number associated with it, and the relevant category that the legend applies to. Unfortunately(!) a product can be associated with more than one category so can have multiples of the above, hence the group field.
On the relevant category page I was hoping to order the products by the Legend number.
Justin Sternberg
@jtsternberg
@noelmcg you might look into the CMB2 setting/getting filters to split those out into separate meta fields
Noel McG
@noelmcg
Good man Justin, I'll get a look at those. Thanks for all your help.
Justin Sternberg
@jtsternberg
:thumbsup:
Noel McG
@noelmcg
Sorry to bother you a again Justin. Is it possible to dynamically add meta boxes, or pre set repeatable fields. E.G one for each category associated with a post/product?
Noel McG
@noelmcg
No worries Justin, have it sorted, thanks again for your help and support, cheers.
Sergey Mochalov
@proweb
hello guys
Justin Sternberg
@jtsternberg
Howdy
Sergey Mochalov
@proweb
I'm looking for way to bild frontend form with repeater group
any existing free form plugins cant do it
or i cant find it
as I now CMB2 can work on frontend
and has repeater
as group repeat
wright Justin?
Justin Sternberg
@jtsternberg
that's right. you may want to look through these snippets: https://github.com/WebDevStudios/CMB2-Snippet-Library/tree/master/front-end
Sergey Mochalov
@proweb
I need something similar to http://www.eurodsp.ru/calculator/
if click on plus
dinamicaly creates new subform
will try recreate it on CMB2
thanks for link Justin
Justin Sternberg
@jtsternberg
:thumbsup:
madvic
@madvik
Hi, I want to know the different options of a function: new_cmb2_box(), but nothing in the documentation : https://cmb2.io/api/function-new_cmb2_box.html
It is possible to add a link in the documentaiton for all options.
Ian Barker
@iantbarker
I'm trying to display different metaboxes on different page templates but can't get it to work
Justin Sternberg
@jtsternberg
you're right, the metabox options need better documentation. The docs are a wiki, so feel free to update them as you see fit and ping me to review
Ian Barker
@iantbarker
The issue seems to be that I have a set of metaboxes that I want displayed on every page/post, but I can't keep those metaboxes and then add new ones on different templates
Justin Sternberg
@jtsternberg
Sure you can
You can use the show_on_cb box property to determine if/when a box should show
Ian Barker
@iantbarker
Like this?
    'show_on'      => array( 'key' => 'page-template', 'value' => 'page-specials.php' ),
madvic
@madvik
@jtsternberg Thanks
Ian Barker
@iantbarker
@jtsternberg I thought Page Template show_on filter would accomplish this but breaks everything
@jtsternberg By break, I mean no metaboxes appear
Justin Sternberg
@jtsternberg
@iantbarker I'm not sure, maybe open an issue on Github and @tw2113 might be able to look at it with you. Be sure to include your entire config code.
Ian Barker
@iantbarker
Ok thanks
Justin Sternberg
@jtsternberg
@madvik thanks a ton! looks solid. I'll update a few things.