Check Custom WP Options

/ Published in: PHP
Save to your folder(s)

This is to check if a custom option exist from the admin panel.

Copy this code and paste it in your HTML
  1. <?php if (get_option('custom-option')) { ?>
  2. Yep
  3. <?php } else { ?>
  4. Nope
  5. <?php } ?>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.