Custom Fields
Support MB Settings Page Image size in Oxygen

  • Creator
  • #27648

    Hi Metabox team

    I'm struggling with the fields from my settings page to show them in the right dimensions:
    I'm using the code snippet below. However in the RWMB_meta the array with the size parameter is added later on, but doesn't do anything in specific. The thing is, when i return the value of that in a field, it automatically shows it square as the thumbnail, but i want it to keep it's orginal ratio. Can anyone help me improve my code? I'm using a single image as meta box custom field.

    /* Avoid Undefined Function Errors */
    if ( ! function_exists( 'rwmb_meta' ) ) {
        function rwmb_meta( $key, $args = '', $post_id = null ) {
            return false;
    /* Get the URL of logo image from the settings page */
    function wpdd_get_mb_settings_logo_url( $field_id ) {
        $logo = rwmb_meta( 'sitewide_logo', ['object_type' => 'setting'], 'general_settings', array( 'size' => 'Large' ) );
        return $logo ? $logo['url'] : '';
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.