Problem: In the settings page the content that I configured does not appear. The field group I have two images and a URL field. But no information that I add on the page is reflected (after I save, the content is all blank, as if I had not configured anything).
Test I did: I tested it by creating another configuration page and another custom field (completely from scratch) and first I did it with a single image field. This one worked. The image I chose was displayed after saving. But when I changed the field to a group of fields and added a single image, the problem I described happened.
Conclusion: From the code it is possible to verify that the data is being saved in the database because it is possible to get all the information, but in the configuration page generated by Metabox it is not getting the information from the group of fields correctly. Thank goodness this did not result in a critical PHP error.
Please fix it as soon as possible.
Thanks.
This is the PHP code generated by Metabox from the settings I made.
<?php
$groups = rwmb_meta( 'slider_desktop', [ 'object_type' => 'setting' ], 'slider_setting' );
foreach ( $groups as $group ) {
// Field slider_image_desktop:
$image_id = $group[ 'slider_image_desktop' ] ?? 0;
$image = RWMB_Image_Field::file_info( $image_id, [ 'size' => 'thumbnail' ] );
?>
<h3>Logo</h3>
<img src="<?= $image['url']; ?>">
<?php
// Field slide_image_mobile:
$image_id = $group[ 'slide_image_mobile' ] ?? 0;
$image = RWMB_Image_Field::file_info( $image_id, [ 'size' => 'thumbnail' ] );
?>
<h3>Logo</h3>
<img src="<?= $image['url']; ?>">
<?php
// Field slider_desktop_link:
echo $group[ 'slider_desktop_link' ] ?? '';
}
?>
]]>I have just updated ultimate member to version 2.6.0. When the setting page (/wp-admin/admin.php?page=um_options) is displayed, if you click on menu options like “access” or “email” you don’t have access to the corresponding pages (/wp-admin/admin.php?page=um_options&tab=access, or /wp-admin/admin.php?page=um_options&tab=email). The menu options are inactives. But the pages are accessible if you enter their URLs in a new tab of the web browser (google chrome).
The WP version is 6.2
Thanks in advance for your support
]]>Tried on a few subsites with different plugins, themes and setups. Host is Kinsta but that shouldn’t effect it…
Any ideas?
]]>I installed this plugin on dev site and tried accessing the settings page to setup a A valid App ID. However it takes me to a page which says “Sorry, you are not allowed to access this page.”
Can you please advise asap.
Thanks in advance.
]]>First of all thanks for this plugin, this is what I want. But for some reason I am not able to see admin setting for this plugin. It was working before but sudden it’s stop displaying. I am not sure what’s wrong with this.
Please help !
Thanks
]]>I’m trying to ad a checkbox to activate easily my maintenance page plugin.
I’m trying to put it in Settings -General page.
I have writted the following code:
function maintenance_options()
{
add_settings_section("maintenance_section", "Maintenance Options", "maintenance_options_content", "general");
add_settings_field("maintenance_field", "Activate Maintenance Mode", "maintenance_form_element", "general", "maintenance_section");
register_setting("maintenance_section", "maintenance_field");
}
function maintenance_options_content()
{
echo "Maintenance settings section";
}
function maintenance_form_element()
{
?>
<input type="checkbox" id="maintenance_field" name="maintenance_field" value="1" ' . checked(1, get_option('maintenance_field'), false) . '/> Checked to activate maintenance mode
<?php
}
add_action("admin_init", "maintenance_options");
But When I checked it and save saettings this is not saved.
How can I realy add my new settings into this page ?
]]>