Problem with adding exta field in metabox in custom post type

You didn’t retrieve your 2 values in the save_post action. You need to get $_POST[’freebie-demo’] (it’s ok for it) and $_POST[‘freebie-downurl’] If you want an array post meta value based, you can do something like that : // Sanitize user input. $de_url[‘name’] = sanitize_text_field( $_POST[‘freebie-demo’] ); $de_url[‘url’] = esc_url($_POST[‘freebie-downurl’]); // Update the meta field in … Read more

Only display custom field if it there is a value inside

use empty function to check if the return value is empty or not: <?php if ( function_exists(‘get_custom_field_value’) ): $custom_field_value = get_custom_field_value(‘Essential info 5′, true); if(!empty($custom_field_value)): ?> <li><span> <?php echo $custom_field_value; ?> </span></li> <?php endif; endif; ?> also check if the function ‘get_custom_field_value’ is returning with echo statement, you may need to change that to just … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)