Number field not showing std

Support General Number field not showing std

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4372
    armandmorinarmandmorin
    Participant

    I have a number field where I've entered a value via 'std', but it does not show in the metabox. Any ideas?

    Here's the code I used...

    					array(
    						'name' => esc_html__( 'Headline Font Size', 'textdomain' ),
    						'id'   => $prefix.'headline_font_size',
    						'tab'  => 'hero_text',
    						'type' => 'number',
    						'min'  => 16,
    						'max'  => 100,
    						'step' => 2,
    						'std'  => 48,
    						'visible' => array($prefix . 'hero_type', '=', 'headline_sub')
    					),	
    #4373
    Tan NguyenTan Nguyen
    Participant

    Dear armandmorin,

    Please make sure the {$prefix}hero_type field is eq to headline_sub

    Cheers!

    #4374
    armandmorinarmandmorin
    Participant

    Thanks for the reply... I should have been more clear. The field appears but the default value of 48 is not displayed. The fields just appears blank. I can enter a value, but the default value is not appearing.

    #4376
    Anh TranAnh Tran
    Keymaster

    Just tried your code and 48 shows up as default value for me. Please note that it works only for the posts where the meta box hasn't been saved. You can check it with new posts.

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