Forum Replies Created
-
AuthorPosts
-
austindw
ParticipantCould a conditional logic be used to hide based on the page template? For instance, I have four templates that rely solely on custom fields for the page content. Any thoughts?
austindw
ParticipantGreat, that works. I did the update before but it didn't do anything, but this time it worked.
I don't know why I was thinking there was something in the menu. Oh well.
Thank you for your help!
austindw
ParticipantOkay, should I just download manually? If so, which extensions? or the Main plugin?
BTW, I can no longer see the "Settings Page" under the Meta Box Menu:
austindw
ParticipantI ran the update from the WordPress updates for Meta Box AIO, but the change didn't make a difference. Do I need to change the code for the settings page?
austindw
ParticipantThank you!
austindw
ParticipantYep, I see that, too, and I save the meta box with that set, but the fields still don't show on the settings page, which is where my confusion lies.
Meta Box Fields:
https://phasetwo.austindesignworks.com/wp-content/uploads/2018/07/Screen-Shot-2018-07-31-at-1.41.26-PM.pngSettings Page: https://phasetwo.austindesignworks.com/wp-content/uploads/2018/07/Screen-Shot-2018-07-31-at-1.39.15-PM.png
austindw
ParticipantOh, and this is what I have for the settings page itself:
add_filter( 'mb_settings_pages', 'prefix_options_page' ); function prefix_options_page( $settings_pages ) { $settings_pages[] = array( 'id' => 'author-phase-two', 'option_name' => 'author_phase_two', 'menu_title' => 'Site Settings', 'page_title' => 'Custom Site Settings', 'position' => 1, 'capability' => 'edit_pages' //'style' => 'no-boxes', ); return $settings_pages; }austindw
ParticipantThis is what I see...
add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' ); function your_prefix_register_meta_boxes( $meta_boxes ) { $meta_boxes[] = array ( 'title' => 'Test Settings Fields', 'id' => 'test-settings-fields', 'fields' => array( array ( 'id' => 'text_1', 'type' => 'text', 'name' => 'Text Field', ), ), 'settings_pages' => array( ), ); return $meta_boxes; }austindw
ParticipantI did, and it still didn't show up there. I also checked the generated code for the fields and instead of showing the settings page ID, is showed an empty array.
austindw
ParticipantWell, I mean adding custom fields to a specific page, post, or template, that can be filled out. I've tried creating a settings page as part of functions.php and a plugin file. The pages are created with that code, but when I cannot get the custom fields to appear even when building them within the MB Builder.
My understanding (and hope) was that I could create the fields with the builder, apply them to the settings page, and those fields show on that setting page when I go there. That's not what happens – the page is there but the meta boxes/custom fields are not. Hence my confusion.
Is that what I should expect to happen? Without adding the fields codes to the plugin or functions.php?
austindw
ParticipantI followed the instructions to create the page but my understanding, from that page and what you're saying, is that I cannot create metaboxes and apply to that page, like I would a regular site page, but that I'd have to generate the fields and metaboxes code and put it within the functions.php or the plugin file. Is that correct?
-
AuthorPosts