Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Rich Deane
@QTRichieRich
@andrew-ok7
Carlos Herrera
@cehojac
Hi
Mike Ellis
@m1ke_ellis_twitter
Hi - can someone point me to how best to use CMB2 within a plugin settings page?
It's all installed and working ok, but if I have a settings page within my plugin, what's best way of showing CMB2 fields?
Chris Reynolds
@jazzsequence
Hey @m1ke_ellis_twitter I recently was looking at this, too. There are docs for creating your own settings page with CMB2, which is the easiest, but I couldn't figure out a good way to use CMB2 fields in existing settings pages or sections because of when CMB2 is loaded vs. when other parts of admin menu pages are loaded. It's possible that @jtsternberg knows of a specific way to hook CMB2 fields in an existing page but the fastest/easiest option is to roll your own. https://github.com/CMB2/CMB2-Snippet-Library/blob/master/options-and-settings-pages/options-pages-with-submenus.php
Mike Ellis
@m1ke_ellis_twitter
@jazzsequence thanks! I got it working but am saving the metadata into a random post - probably a terrible idea but I went with a super-high ID and it's only for a prototype anyway so hopefully should be ok!
Justin Sternberg
@jtsternberg
@m1ke_ellis_twitter post your code somewhere and we can potentially review. Preferably a gust or something with a bit more context.
Justin Sternberg
@jtsternberg
errr.. gist.
xyweb
@xyweb
hey I'm beginner, I use options-pages-with-tabs-and-submenus.php but I don't know how to show my options in my template. "myprefix_get_option( 'field Id' )." dose not work for me
Daniel Sarria
@danielcsarria
Is this chat still active?
iBudsLK
@iBudsLK
Hi
I just wanna activate the google map for my testing server
I have already created API key from google
and added to the field in the cmb2
but it still shows the developer watermark and it won't save the address
can somebody help on this please
Justin Sternberg
@jtsternberg
CMB2 doesn’t have a map field, so you’ll have to ask the author of the plugin.
AsafAzoulay
@AsafAzoulay
Hi, it is possible to add group of group fields?
AsafAzoulay
@AsafAzoulay
Do you have full example of how to do custom fields inside a group field + repeatable + save data correctly?
Justin Sternberg
@jtsternberg
AsafAzoulay
@AsafAzoulay
ok , thanks... i will try it
md.mortuj alam
@mdmortujalam_twitter
hi
Justin Sternberg
@jtsternberg
👋
amirhosein karimi
@amirhoseinkarimi441_gitlab
Hi, a question!
Doesn't the group sort work?
Justin Sternberg
@jtsternberg
Not sure what you’re referring to
Firoz zaman
@Firozzaman19_twitter
hello
CMB2 is not showing any group type fild
Abu Sufian
@asufian97
hi?
Divan van Tonder
@nonadivan
Hi everyone, I'm having an issue with the repeatable groups not sorting correctly and I was wondering if anyone could help me? I'd also like to be able to drag and drop the repeatable groups, I see there's a PR open for this already. Is there anything I can do to help with that?
Justin Sternberg
@jtsternberg
Hmm regarding issue, probably best to open a thread on the support forums: https://wordpress.org/support/plugin/cmb2/
regarding the PR, the best thing you can do is to test test test it!
Divan van Tonder
@nonadivan
I have been doing some more debugging today and I noticed the repeatable fields are in fact being reordered correctly. However if the WYSIWYG fields are set to visual they are not reordered with the rest of the group which causes quite a mix up of content. I have looked around and found an issue somewhat related to this which has been fixed already. I've just updated the plugin version and it's working :D
Hopefully I can find some time to assist with testing the PR
Justin Sternberg
@jtsternberg
Sounds like you may be having issues with the javascript. The wysiwyg fields should work fine when re-ordering.
AdWest
@adwestudio_twitter
Hi. Can I use CMB2 in my free/freemium plugin that will be posted on wordpress.org?
Justin Sternberg
@jtsternberg
@adwestudio_twitter yes, you can.
ashvin
@monparaashvin
$productsettings->add_field( array(
'name' => 'Select Size Guide',
'id' => 'sizeguide_options',
'type' => 'product',
'class' => 'sguide',
'object_types' => array( 'static_block'),
'field_type' => 'taxonomy_select',
'placeholder' => 'Select a Size',
'query_args' => array(
'post_status' => 'publish',
'posts_per_page' => - 1,
),
));
not create filed in product page
Vitor Silva
@Vitor_Silva_gitlab
Hello! Does anybody knows if the documentation shows how the metadata is stored on the database? Im doing an external REST API that connects to the wordpress database and I want to understand how the fields from each metabox that I created are stored. Thanks!
maaz
@kmftn_gitlab
"Metabox configuration is required to have an ID parameter." getting this issue on subdomain in multisite setup. On Main domain cmb2 form works fine.
Does anybody has solution regarding above issue? Thanks in Advance!
@jtsternberg
Justin Sternberg
@jtsternberg
You'll have to provide more information about your setup. Probably best to open a support thread: https://wordpress.org/support/plugin/cmb2/
NicHagane
@NicHagane

hi, i'm having a problem.
i have a wp multisite that is using CMB2. The issue is: sometimes the information on my custom repeatable groups doesn't show information on administration or front page but all the information exits on the database.

someone know somoting about this problem?

emilianonatella
@emilianonatella
Hi, when installing a wp theme, it gives me the following error: "Failed opening required 'vendor / CMB2 / init.php"
I saw that the init.php file in the folder doesn't exist. What should I do? Create an empty file "init.php"?
Gopi chand
@vgopichand09
Hi
Justin Sternberg
@jtsternberg
@NicHagane that sounds like a switch_to_blog error. Where some plugin/theme used that function but didn’t restore the previous blog
@emilianonatella that sounds like an issue with the theme. Did you contact the theme author?
Pawel Dabrowa
@PawelDabrowa
Hi I would like to create admin menu with CMB2 but the snippet on the github it isn’t good
Anyone can send me any link to some resources, thanks.