Ready to get started?Download WordPress


Advanced Custom Fields
Do something after click on the checkbox field of custom post type. (2 posts)

  1. danielffr
    Posted 2 months ago #

    I am building an website for displaying products. I have the custom post type "products" and this post has many custom fields, one is a checkbox with only one possible choice. This checkbox is there to allow the product to display in front page as a featured product. I need to have only one product with that checkbox checked. To prevent that more than one hava that checkbox checked is there a way to when we check that checkbox field, uncheck the same checkbox field in the others products?

    I hope that i made myself clear.

    Thanks in advance!


  2. domokun
    Posted 1 month ago #

    Your question makes sense, but I don't believe thats possible.

    I would suggest that you alter the wp_query on your homepage to only pull back a single, latest post.


You must log in to post.

About this Plugin

About this Topic