Adding two value to WP custom fields

I have a custom-field applied to specific posts, but I want to add two values to one field. How do I do that from the admin side?

enter image description here

Read More

CSS

.post-1 {
  text-align: left;
  padding-left: 50px;
  background-position: left center;
  float: left;
}

I want to add ‘.bgAlign’ class to the value of ExtraCSS. I tried just adding it but doesnt seem to work.

Related posts

Leave a Reply

1 comment

  1. You can simple append your class after post-1 with comma separator. It would be look like post-1,bgAlign,one-more-class.
    Use this to output

    <?php global $post; ?>
    <div class="<?php echo str_replace(',', ' ', get_post_meta($post->ID, 'ExtraCSS', true)); ?>"></div>
    

    Changing commas with spaces