As @birgie pointed out, add a conditional statement to check that the date has been set:
if ( isset( $item->date ) && strlen( $item->date ) > 0 ) { ... }
Related Posts:
- How can I get an XML export of my 1K+ posts WordPress instance?
- How can I export post data in xml format?
- How to limit the content coming from wordpress shortcodes?
- How to properly loop through these external URLs to get them into the sitemap using this hook
- How to make a XML/PHP file returning custom field data from page
- How to split links generated into an xml sitemap to avoid exceeding 30 sec maximum execution time?
- Display image from an external rss feed on wordpress without plugins
- WordPress ajax-action failing because of newline in response
- SOAP Request/Parsing XML From wp_send_json_success
- Add valid XHTML closing img tags to WordPress galleries
- Fetching review value using wpdb class
- Export post data with xml to other site using php soap
- WordPress create custom XML RSS feed template
- Import Instagram post as WordPress post
- How do I get data from my database into my Custom Export Field
- WordPress post insertion from PHP file
- Creating a WordPress addon for ContactForm7 submission (.XML file export)
- How can I export data without using any import/export plugin
- Dynamically Create Posts Via XML File
- Adapting a php array to WordPress
- how to iterate through xml data?
- XML WP_Query problem in PHP 8.0 and 8.1
- Custom query to get post names beginning with a digit
- PHP XMLRPC for WordPress: Adding meta tags and description
- Real time Duplicate title check
- How to check from which page the user is coming to the current page?
- Blank on static home page?
- probleme adding Txt and Links in preg_match()
- Adjust the results quantity for Search Results page pagination
- Execute only on a certain page
- Audio tags around Mp3 URL in content
- the_author_meta not working
- Configuring WP-CLI on Windows 10
- Assign a picture URL to a page via PHP
- Display user role Name – not slug
- Adding ads code between comments
- How to create and work with custom data / tables (i.e., for arbitrary data)?
- How to add custom post meta to default blog post?
- Limiting woocommerce line_total decimal length
- Shortcode content filter?
- only show container with next/prev links if they exist?
- JS file work only in index page
- If no products are on sale – hide ID or class
- Update grandchild repeater field with value per row
- Paypal form integration with wordpress registration form without plugin [closed]
- How to get the value of input hidden html from text editor to custom page template?
- Uploading files using the Settings API
- fatal error call to undefined function get_header in index.php on line 1
- Plugins not working on AJAX requests
- Fetching instagram api not working on wordpress
- JQuery calling a Custom PHP function (Works in Dev but not in WordPress)
- height should be set to auto to avoid pixelation in the post thumbnail function
- Get posts from multiple post type
- How to convert select to HTML with PHP tags inside of it [closed]
- get the correct url for an folder in wp-includes wordpress
- Display related posts without a plugin
- Can’t access site after making changes to the functions.php [closed]
- Replace Woocommerce “add to cart” to be “Download” button [closed]
- JS value to PHP variable to change div background color with PHP If else statement
- Store post content in a php variable and output them using for loop
- Running rmdir function on post save
- Simple AJAX notification when the new post is added to the database
- Upload multiple files in randomly generated folder using wp_upload_bits
- How to display a custom product field value of a specific category on a Woo Commerce checkout page?
- Parse error: syntax error, unexpected ‘}’ [closed]
- Adding an interior ‘hero’ area with some added php title customization
- Creating customized php files in theme folder
- How to check if a category has a parent and child categories?
- Accessing Global Vars & Functions in custom php page
- Using an “IF” statement based on the existence of custom field
- WordPress time queries
- WordPress get last inserted user id
- How to put search bar & logo in the “primary navigation” storefront theme?
- Providin exception to WordPress wp_nav_menu Custom CSS Classes
- Send an e-mail on address with the link with disliked post
- List sub categories and corresponding posts of a parent category
- Time Stamp In A WordPress Post Title That Does Not Keep Refreshing
- Display featured image of post type category
- IF statement not working – Any suggestions?
- Child theme overirde template-tags in a theme built on underscores in inc/template-tags
- Get x numbers of a woocommerce category products using Wp_Query
- using filter and hook inside class
- $.ajax results in 403 forbidden
- Change upload URL by mime type
- in the post admin, is it possible to make the post title input disabled using php?
- Serve cookie free URLs in WordPress without using a CDN
- How to send logs to plugin owner for a plugin?
- Where to check in PHPmyAdmin / SQL database for subdomain
- How to add style in functions.php depending on conditions?
- Dynamic form variables for post meta
- allow previews outside wordpress folder (Outsourcing WP previews)
- Creating image gallery in wordpress
- get_category only returning details for ‘uncategorized’
- Nav Menu Display
- Check radio get value to array
- Your PHP installation appears to be missing the MySQL … After deleting and restarting from cpanel
- How to create shortcode of this PHP code
- seo meta description issue in google search
- Redirect loop upon installation of my plugin
- PHP Works only for logged in users: [closed]