Changing the text/background colour is easy W3 Schools. You can do this with javascript or easier just add a style to the <div>
with a PHP condintion
<?php
if ( $due == true )
echo '<div style="color: red">';
else
echo '<div style="color: black">';
?>
Related Posts:
- ORDER BY custom field value
- Best way to programmatically remove a category/term from a post
- display specific custom fields
- Add new “Insert Into Post” button with another function
- Multiple meta values for same meta_key adding on “Preview Changes” hit but not on saving or updating post
- How to add new custom page or post blocks?
- Transients vs CRON +Custom Fields: Caching Data Per Post
- Best way to allow manageable social media URLS?
- Slow meta query with multi meta keys
- Custom Field Multiple Clauses
- Adding a custom field or metabox to the post-thumbnail widget?
- Using WP Query to search by multiple meta fields
- Get aggregate list of all custom fields for entire blog
- Send Multiple Custom Field Values Through the URL
- Sort by posts that have a featured image?
- WP_Query display next custom post from today’s date
- Can ordering post list by meta_value cause performance issue?
- $wp_query meta_key naming issue [closed]
- Meta_query and numeric comparison [closed]
- Title and post URL based on custom fields?
- woocommerce product custom field
- using multiple meta_key and meta_value in query_posts
- Multiple relationships in a query
- How Meta Data is different from Custom Fields of POST/PAGE in WordPress
- two custom fields question
- How to save multiple options from a dropdown in user profile
- How to display multiple images in custom field
- global function to apply filter to custom field
- How to add a new meta key and assign timestamp to posts
- Display the contents of a custom field of a page on their child
- Print custom field in Query Loop block
- Read / Watch / Listen times – meta
- Login WP – Connect single field to an external api
- Order RSS content by an advanced custom field value
- Advanced search by two criteria – sort by location and date (ascending or descending)
- adding extra wordpress user info from registration form
- Collect user custom field in product page woocommerce
- Turn raw url into clickable links
- get posts where a custom field contains a text
- Displaying a custom field
- meta fields for the whole wordpress site
- Advanced Custom Fields functionality without plugin
- Get post ids sorted by meta_key
- Unable to get specific value from post meta
- 3.8 Media Upload and Custom Meta Box
- Displaying Custom Field Array
- Let’s Create Custom Field Template Documentation
- WordPress Settings API Repeatable fields
- WordPress creates new lines in postmeta table on post update
- How to add custom filed value after in wp post title
- User customising position of WordPress Featured Image
- Accessing Custom Fields on Pages
- How to Pass values to Custom Field through PHP in WordPress Posts?
- Custom field php
- Display a different image for each page with editor
- how to add product subscription field in woocommerce plugin
- How can I change the publish date based on a custom field?
- WP_query multiple custom fields not working
- Best way to sort estates and query them (for rent? yes/no. contains office space? yes/no)?
- Getting and calculating averge value of custom fields of the same tag
- Only admin should be able to add a particular custom field
- Automatically Add Custom Fields Value as Tags
- How to display custom fields in hestia theme
- Custom date column in user table not sorting correcting
- pass custom value from single.php to another file via get
- How to speed up post list slowed by update_meta_cache()?
- Custom Fields displaying in single line
- variable not passed correctly to database using custom field
- WordPress Blocks, setAttributes not saving
- How do i call up default post title in custom posts
- Custom Field URL + description
- How to save multiple custom user profile fields using repeater JQuery
- Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title
- Issue on Creating Checkbox Field On Custom Post type
- 4 Unique Random Posts based on Custom Field Values
- Save input form on custom field
- Page template is missing fields or is invalid when I updating the template
- Admin – Search Events by a custom field
- create a custom field that let me include other posts
- Check if value exists before saving
- Get meta value when the page is a blog archive
- Populate a select box with data stored in the database?
- Change path to child of page when uploading image via custom field
- How can I hide my section title if there is no data in custom fields?
- Meta Box Data added to header redirect
- How to Pull Out Twitter Summary Data in other areas of my template?
- added a meta box to post however when saving menu while debug on throws a warning
- How can i get the actor birthday by date?
- Post rating using Custom Field
- Inserting custom fields into new-post.php without using the Custom Fields Template plugin?
- How can I attach files without using a plugin?
- Advanced Custom Fields for Header that are Editable from a Page [closed]
- Change Fields of Comments and make them searchable?
- Shortcode not picking up custom field
- Order by a meta field in query loop
- Add CSS class to posts with certain meta key
- Best way for managing images of ads banners
- Crop custom image size vs actual size
- Multiple permalinks for a single post from custom field
- Search for meta_query does not return any result if combined with title