On the custom fields tab, they are four options:
– post types
– taxonomies
– user roles
– settings.
If you click on settings, you can create various custom fields. What’s the role of this tab (settings)? While I understand I can create custom fields for post types, taxonomies and user roles, I do not understand what would happen if I create custom fields for settings.
Hi,
Thank you for showing interest in CubeWP.
We have made this field for the developers. You can add any fields in the CubeWP Settings by creating the fields simply. The Field you create in CubeWP settings will be available in the CubeWP Settings.
This feature greatly enhances the customization capabilities of CubeWP.
To fetch the value of a field on the frontend, developers can utilize the following code snippet:
global $cwpOptions;
$variable = !empty($cwpOptions[‘YOUR_OPTION_NAME’]) ? $cwpOptions[‘YOUR_OPTION_NAME’] : false;
if ($variable) {
// Perform desired actions or operations
}
When implementing this code, please remember to replace ‘YOUR_OPTION_NAME’ with the actual name of the option or field created in the CubeWP settings. The $variable variable will then hold the value of the field if it is not empty. Consequently, you can execute specific functionalities within the if statement based on the retrieved value.
It is important to customize the code to meet your specific requirements and incorporate it into your theme or plugin files wherever you need to access the CubeWP settings.
Best regards,
CubeWP Team