Forum Replies Created
-
AuthorPosts
-
maybeadev
ParticipantI think that still automatically closes a div that might be set in the BEFORE setting, right? I believe I tried that a bit ago. If you use a before such as '<div class="xxxx">' something causes the div to close up before we can specify a closing '</div>' of our own in a later field.
Unless that behavior has changed recently?
Thanks.
maybeadev
ParticipantHi:
Thanks. I actually want to add a class around a group of fields already inside the metabox. Adding the class on the metabox affects all fields. I want to add the class only around one or more groups of fields inside the metabox.
The only solution I was able to arrive at for this was to directly modify the metabox-columns plugin.
I modified it to accept two more values in the metabox array of fields "column_row_before" and "column_row_after" which allows for injection of the field class before and after any field 'row' without automatically closing up starting div.
I was hoping to be able to submit that as a PR against your repo but it's not a public repo.
There's probably a smarter way to do it - maybe by wrapping things the way the metabox group module works. But didn't want to spend that much time figuring that out.
Here's an image of the code changes for anyone interested.

Thanks.
maybeadev
ParticipantWeirdly the filters do seem to be called. I guess I'm not searching for the right things in the code.
So here's the question.
If I use the rwmb_outer_html filter to add a beginning div to the outer wrapper of a field, is there a way to prevent it from automatically adding the ending div until I add it manually to the end of another field?
Basically I'm trying to add a div wrapper to a group of fields. But no matter which filter I use, metabox seems to automatically try to clean up the html with matching closing tags which messes up what I'm trying to do.
Thanks.
maybeadev
ParticipantActually, I can't find any of the html filters mentioned on these documentation pages:
https://docs.metabox.io/filters/rwmb-outer-html/
https://docs.metabox.io/filters/rwmb-wrapper-html/
https://docs.metabox.io/filters/rwmb-begin-html/
https://docs.metabox.io/filters/rwmb-end-html/
https://docs.metabox.io/filters/rwmb-html/Thanks.
maybeadev
Participant@bluemoon75 - maybe try playing with this JS script. You'd have to enqueue it using a custom plugin and maybe tweak it a bit to address the correct css tab references.
https://gist.github.com/wpcloudpanel/4d6dce54a225f2a6de183841dc1d4534
maybeadev
ParticipantHi:
I think something got lost in translation.
I'm looking to wrap a SUBSET of fields with a custom div. So, something like this.
// CUSTOM HTML array( 'type' => 'custom_html', 'std' => __( '<div class="myclass">', 'my-metaboxes' ), 'id' => 'myid', ), /* Some fields here... */ // CUSTOM HTML array( 'type' => 'custom_html', 'std' => __( '</div>', 'my-metaboxes' ), 'id' => 'myid2', ),You'll notice that the fields specifed by 'some fields here' are being wrapped in a custom div.
That's the effect I've trying to achieve.I don't think the suggested use of the rwmb_subfieldID_wrapper_html filter will allow for this?
Thanks!
maybeadev
ParticipantHi:
Thanks for the response. However, I'm asking about using PHP code to do this, not using the UI or AIO.
I thought about trying to sue the rwmb_being_html or rwmb_wrapper_html filters but those seem to only apply to a full group instead of a subset of fields within the group.
Thanks.
maybeadev
ParticipantHi:
Thanks for the response. Is there a feature or module in metabox.io that does do that?
Thanks.
December 22, 2022 at 11:04 AM in reply to: ✅Function WP_Object_Cache::get was called incorrectly #39976maybeadev
ParticipantWas this also fixed in the custom table add-on?
maybeadev
ParticipantHi:
Thanks. Unfortunately, that still doesn't work.
When I echo the value out to the error log, it looks like the filter is called four times.
The first two times, the values are correct.
The last two times the values are empty.
Would appreciate any other ideas you have.
Maybe I should only define the metaboxes if the post id is greater than zero? Would that have any side effects?
Thanks!
maybeadev
Participanthmmm...I don't think the new version fixed the issue with the horizontal tabs overflowing he container. It's still occurring with the new version.
maybeadev
ParticipantHi:
I see there's a new release for the tabs add-on but I can't find a change log. Do you know if this issue was fixed? And what other issues were fixed (if any?)
Thanks.
maybeadev
ParticipantNote: The later versions of the tab module has the rwmb-tab-nav class set to display:flex. If that is removed, the wrapping works properly and the tabs stay within the metabox container. Older versions did NOT have the display set to flex for the rwmb-tab-nav class.
Thanks.
maybeadev
ParticipantActually, I figured it out. Gah.
This was definitely user error.
You can close this topic.
Thanks!maybeadev
ParticipantI should mention that other metaboxes showup in their respective post types - even SETTINGS. It's just the user profile that isn't working for some reason.
Thanks.
-
AuthorPosts