Link to home
Start Free TrialLog in
Avatar of UltraFlux
UltraFluxFlag for Canada

asked on

Check if custom field is set

Hi,

I have a few custom fields set in my post area.

Is there a way to test/check if the custom field is blank?

isset?
Avatar of jeremyjared74
jeremyjared74
Flag of United States of America image

What is the function of the custom field?
Is it a text area?
Is it an image?

You should be able to go to the post in the WP admin panel to check if the custom field has any content.
Avatar of UltraFlux

ASKER

I want to test the custom field before displaying on the website (not admin)

ex:
Custom Fields
price-new
price-sale
style

None of these fields are required. If one is blank I simply do not want it to show on the website.

ex:

Price New: $340
Price Sale: $250
Style: New

If "price-new" is not set website should not display "Price New: $340"

Basically I just need to test if the custom field is either set or empty...
ASKER CERTIFIED SOLUTION
Avatar of Heather Ritchey
Heather Ritchey
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial