WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Fields
[resolved] Conditionals (2 posts)

  1. snakesmaster
    Member
    Posted 2 years ago #

    Hi!

    I need to make a conditional for one custom field. Let's say that I created a custom post called "price". If is empty I want to hide de DIV container "custom_price", if not I want to show it. Something like this:

    <div class="custom_price">Price: <?php the_field('the_price'); ?></div>

    Thaaank You!!!!!

    http://wordpress.org/extend/plugins/advanced-custom-fields/

  2. brasofilo
    Member
    Posted 2 years ago #

    you will have to do a little tweak in the plugin so you can use jQuery for that

    follow the code I posted in this thread
    http://www.advancedcustomfields.com/support/discussion/1481/styling-the-custom-fields-in-the-admin#Item_13

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic