Use customfield Image as background in Oxygen

Support MB Settings Page Use customfield Image as background in OxygenResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27513
    info@ceescoenen.nl[email protected]
    Participant

    I need help MetaBox in Oxygen:
    I will use MB Settings (name: website) to make a custom field for the header image. I have set the field type to image(name: image_header_large).
    The function I have make is :

    function mb_website_img( $field_id ) {
        $images = rwmb_meta( 'image_header_large', ['object_type' => 'setting'], 'website', array( 'limit' => 1 ) );
        $image = reset( $images );
        return $image['url'];
    }

    In the PHP Return Value of the BAckground Image I have set mb_website / default value (for now).
    No image will appear in the background. I thing the code is not correct.

    #27546
    Long NguyenLong Nguyen
    Moderator

    Hi Cees,

    All the extra arguments should be in the array of the second argument of the helper function.

    $images = rwmb_meta( 'image_header_large', ['object_type' => 'setting', 'limit' => 1], 'website' );

    Get more details on the documentation https://docs.metabox.io/rwmb-meta/#arguments

    and refer to this topic https://support.metabox.io/topic/settings-page-image-output-stuck-in-150x150-configuration/

    #27569
    info@ceescoenen.nl[email protected]
    Participant

    Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.