Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Brian Reed
@iambriansreed
Thanks for the hand holding. :)
Justin Sternberg
@jtsternberg
my pleasure :)
bentalgad
@bentalgad
Is it possible to set the year range of the date field to go back before 2006 (that’s what i’m seeing now, and i need to go from 1965-2000)?
Justin Sternberg
@jtsternberg
@bentalgad While the UI/UX isn't super obvious, that is built-in: http://b.ustin.co/T5YY
bentalgad
@bentalgad
wow, that's very confusing... :(
Justin Sternberg
@jtsternberg
@bentalgad I agree. It's the standard jQuery UI datepicker
bentalgad
@bentalgad
oh, got it :) thanks!
let me test that
bentalgad
@bentalgad
Great! Thanks!
bentalgad
@bentalgad
I use a date field like that:
'$basic_box->add_field( array(
'name' => 'תאריך לידה',
'id' => $prefix . 'birthday',
'type' => 'text_date',
'date_format' => 'd/m/Y',
) );'
And it doesn't save dates that have a day parameter greater then 12. am i doing something wrong?
Sergey Mochalov
@proweb
why I don't see years in datapicker?
blob
Ian Beck
@onecrayon
Anyone know if it's possible to use CMB2 to store repeating values as multiple assignments to the same key instead of an array assigned to a single instance of the key?
Ian Beck
@onecrayon
I found an undocumented 'multiple' argument for fields that looks like it does what I want, but it's mutually exclusive with the 'repeatable' argument
Justin Sternberg
@jtsternberg
It's definitely possible by using the save filters and bypassing CMB2's default save/fetch behavior
Sergey Mochalov
@proweb
and here it comes
PDF in Media
with thumbnails generation
Justin Sternberg
@jtsternberg
Nice!
TheNewGuy16
@TheNewGuy16
Does anyone know of an easy way to get the categories of images on a page that were uploaded there using a CMB2 file_list field?
Justin Sternberg
@jtsternberg
@TheNewGuy16 could you clarify? I'm not sure I follow the question.
media doesn't have categories by default, unless you've added it somehow
file_list value is an array where the keys are the attachment's ID, and the value is the attachment's url, so you can always use the attachment ID to get data about it.
TheNewGuy16
@TheNewGuy16
hey sorry i didnt mention that i added it using a plugin so that it would show up in the pop up modal. SO a wser admin goes to a page which is a main portfolio. Then they upload images to that portfolio and can can check categories right there in the upload modal. Now i need to get the cat_name of each image uploaded some might have tow or three cat_names. So you are saying i can somehow use the attachment IDs to get these cat_names?
Justin Sternberg
@jtsternberg
Interesting. I don't have the answer for you as it's still not clear to me how the bits are tied together
TheNewGuy16
@TheNewGuy16

so the CMB2 part is just a file list to upload images to a page. Then i installed a plugin to add categories to the media attachments. I believe its just using the categories taxonomy. I tried to just add categories my self but my boss wanted to have check boxes in the popup modal for the media so this plugin handled that.

Ok so I have the images upload and some categories check in the pop up modal. I have got the images on to the page using CMB2 example page code for file_list. Now i need to some how get the cat_names that are associated with each image, which could be more then one cat_name, and then add them to a div class. I am doing this so that I can use isotope to filter the divs. Does that make sense. and now i am using the $attachment id to get the images categories with this
$category = get_the_category($attachmentID);
then show the cat_names like so
echo $category[0]->cat_name
but the problem now is that it jsut shows the first one i think because of the 0 but some have more then one do you now how to get all of the cat_names from the array do i need to do a loop of some sort?

TheNewGuy16
@TheNewGuy16
got it had to use another for each statement ot get the term slugs seperated
Hasan Ahmed Jobayer
@dumketo
Hello
any one here
Justin Sternberg
@jtsternberg
Hello
Noel McG
@noelmcg
Hi there, how do you guys deal with Wordpress Search and ensuring that fields are included in search results?
Justin Sternberg
@jtsternberg
For performance, I suggest something like ElasticPress. If that's out of the budget SearchWP can be a decent solution.
Noel McG
@noelmcg
Thanks Justin, cheers fro the heads up. I wasn't aware of ElasticPress
Justin Sternberg
@jtsternberg
Sure, my pleasure
loungeme
@loungeme
Hello @jtsternberg , are you online?
Justin Sternberg
@jtsternberg
Hey hey, what's up? @loungeme
Mustafa Kamal Hossain
@nisan92
Hello
anyone ??/
How can i create a custom meta box with a custom callback function.... is there any way to do that with cmb2
Justin Sternberg
@jtsternberg
custom callback function for what specifically?
TheNewGuy16
@TheNewGuy16
hey anyone available
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?