The Codex ( or Developer Resources ) is a fantastic tool when you’re unsure about a function. Looking at the parameter list for the_date()
it says:
the_date( $format, $before, $after, $echo );
So you need to pass in a format as the first parameter, then your HTML tags like you have it. An example could look like this:
the_date( 'l, F j, Y', '<h4 class="entry-date">', '</h4>' );
Related Posts:
- Check if a menu is empty?
- Loop on a wordpress Page instead of content coming from the WP text editor
- Exclude pages with certain template from wp_list_pages
- Easiest way to show total number of subpages
- Switching between custom templates in a post type of the admin menu
- Use template for posts with a particular category grandparent
- page template for attachement page?
- Add a Second Menu to a theme that only support 1 menu
- Custom excerpt function re-factoring
- Custom Template 404 for specific custom post type
- Showing content from one page on another
- how could I load a different template part by page
- Change title only in dynamic page
- Populate editor with some content of a page with a page template
- Is the “_s” on this `sprintf(__(‘Page %s’, ‘_s’), max($paged, $page))` just refer to a text domain?
- Does wordpress templates always in files or in database?
- Inject class in body when particular page template is used
- Use WordPress function in php file
- Show meta box only for default page template
- WordPress template page name displayed on screen
- How to call multiple functions from multiple files into a WordPress page template [closed]
- Function Reference Documenting Template Tags for use in Custom Theme Templates?
- Create page template via functions.php?
- add_filter function concatenate string and locate_template function
- Template Loop – add switch case php
- Splitting the_content() by size?
- Some problems calling a function into sprintf() inside functions.php template file [closed]
- Display additional page templates and a sidebar on plugin activation
- Prevent header and footer from loading on specific pages with template or plugin
- Contain multiple page templates in one PHP custom template file in WordPress?
- Display metabox galleries on specific page template in admin editor
- How to include a function in a template with template tag
- remove_action() not working in page template – Genesis
- Calling PHP function doesn’t work in index.php
- Display custom meta box in my template file
- php “use” not working in template [closed]
- WordPress post-template null warnings
- Customize field names in backend profile edit page through function.php [duplicate]
- Make table disappear when fields are left blank?
- Menu not styling. New menus functionality giving me a headache
- Get date function not working
- How do I add my PHP app to a WordPress page whilst keeping semantic URLs?
- Pagination Not Working (pages duplicating content)
- Use of antispambot with $curauth->email
- Auto create Nextgen Gallery on post creation [closed]
- Uses for function: wp_update_user
- How do I call an external php non WordPress class into functions.php?
- Insert content into head tag with function
- Getting a WordPress tag to print inside of a traditional php echo
- Function to call either single post or category
- Custom functions for string data calculations
- How are these PHP functions applied to a specific page in WordPress?
- WP insert post Redirect after function has executed
- SQL error with custom query
- The additional fee for the COD payment method not visible in the front-end
- Hide media for non logged in users
- Programmatically revert to backup .htaccess a possibility?
- PHP identify duplicate words in a text string against a list of words
- How to access all meta data for RSS feed?
- Why Is Number of views on wordpress single post wrong?
- Restrict post to current user in postmeta
- send popup after wp_redirect()
- Remove role of user after X days
- Execute PHP code only with specific user role
- Change Language Title Pagination on Subdomain non Multisite
- remove specificly the last tag in all posts
- User filter posts by year
- How to Redirect Buddypress Directories To Login Page For Non Logged in Users
- How to set value selected using select2 jquery plugin
- bp-custom.php is not working on a WordPress multisite environment. how to fix it?
- Woocommerce order status payment
- Why wp_remote_get() fetches certain web pages while it doesn’t work for my localhost?
- WP Container Displaying Only on First Page of Archive
- Getting text from custom field from customizer
- Workaround for og:image unsupported webp image type, Yoast SEO?
- How to define a rule in functions.php that ONLY disables the default wp functionality that undesirably changes ‘&’ to ‘#038;’?
- How to change the author box selection on a post to a custom taxonomy
- Modify WooCommerce used to get all orders in dashboard
- Let current user know pending posts counts using wp_query
- How to remove/hide collapse menu for user/subscriber?
- How to check post meta isset or not empty during publish/save post?
- Output product category link from WP_Query
- How to implement __() function in my theme’s php file?
- Unzip file in functions.php, and add it to cron
- Adding onload to body for certain pages
- Disclaimer that will show every refresh of the page
- Add Block Before Entry Title Using PHP
- Time Delay a URL Redirect for Specific Page
- Delete images from media library when user deletes an image from ACF Gallery
- how to changes mobile menu toggle breakpoint in WordPress
- Dynamically switch file in get_template_directory_uri() | Function [closed]
- Get page permalink in contact form
- Isn’t Returning Value While Using SELECT COUNT(*) FROM {$wpdb->prefix}
- How to display already created menus via php?
- Updating Metadata with Shortcode
- Grabbing Image name From Product Image Gallery
- Reject all malicious URL requests functions.php
- can’t load .po file in functions.php
- How to assign page id with array in page_scheduled_event
- Need help for some PHP code