Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does anyone know if its possible to show tabs conditionally? #28

Open
pgroot91 opened this issue Apr 23, 2020 · 2 comments
Open

Does anyone know if its possible to show tabs conditionally? #28

pgroot91 opened this issue Apr 23, 2020 · 2 comments

Comments

@pgroot91
Copy link

Hi Guys,

Just trying to figure out if its possible to show tabs conditionally. First thought was something like cmb2-conditionals... But this seems to be used only for fields.

Then also came to my intention is the "show_on/show_on_cb" solution. This is something i haven't tried myself yet so will look into this. But hoped to find people here that encountered the same thing.

Any other solutions available to your knowledge that may work?

@pgroot91
Copy link
Author

pgroot91 commented Apr 23, 2020

Just to my surprise someone already made a PR for the show_on_cb solution #23 . Will give this a spin and see if this works out for me.

@pgroot91
Copy link
Author

pgroot91 commented Apr 23, 2020

I have tested the branch and have some problems with the implementation.

  1. You need to have the "show_on_cb" specified on your tabs or you will get the following notices.

Notice: Undefined index: show_on_cb in C:\xampp\htdocs\dev1\wp-content\plugins\my-plugin\includes\cmb2-tabs\inc\cmb2-tabs.class.php on line 67
Notice: Undefined index: show_on_cb in C:\xampp\htdocs\dev1\wp-content\plugins\my-plugin\includes\cmb2-tabs\inc\cmb2-tabs.class.php on line 79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant