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]
- How to add a .php file to WordPress
- Hide old attachments from wp media library
- PHP – redirect https to http and www to non-www
- How to overwrite youtube embed?
- Need to get specific data from array
- Categories Template Assistance
- Generating add_settings_section() calls dynamically
- Sort registered users by post count? (inside admin dashboard)
- How to change a public function inside a class of a plugin?
- WooCommerce – Reset quantity input field when variation changes
- Query all posts of a custom taxonomy term
- Trying to establish connection to External Database
- Login/logout in header
- Error when adding excerpt to the content through functions.php
- Add data attribute to each li in menu
- How to abort saving data in save_extra_profile_fields function WordPress?
- Get the date of the className or classID
- Way to add captions to gallery images by code
- Create a Blog Template Page
- How to fix this warning:call_user_func_array() expects exactly 2 parameters, 1 given in D:\wamp\www\…….\wp-includes\class-wp-hook.php on line 286
- How to set the WordPress logo programmatically with PHP
- Function works everywhere, how to keep it to execute when creating a new post
- Function won’t run onclick using Ajax
- Add login hyperlink to secondary navigation menu
- List all blogs, but exclude the main site
- get_page_template_slug returns incorrect path
- Reading settings in the home page precisely home.php
- Calling function in loop causes repeat data
- Is there a hack for using is_page() within the function.php file?
- php loading different structure than source code
- Add a select-option to the default widgets
- Programmatically revert to backup .htaccess a possibility?
- WP-Bakery – Add custom colors to buttons with template colors
- WordPress User Meta value variable into Google Gauge Chart
- Show all people who commented on all posts by an author
- Require()/Include() post template adding extra content
- Trim Titles Only On Some Pages
- Custom global variable not working in function
- Embed video from streamtape using direct link
- Is there a PHP function that will return the block ID generated by WordPress?
- get_the_author_meta( ‘ID’ ) just return 1
- Enqueue sripts and styles only if function is called
- Site title not showing. Please help me
- Check if post visited first time
- Store custom field’s multiple values in one user meta key
- How to display last whole post on the homepage
- Need to Echo A Url path to show on a wordpress page
- Theme editing “post thumbnail” help
- Pass form attributes to another php template in wordpress
- Restrict File Type Uploads by User on Wordress via functions.php
- How to Request a User to Register on Landing at a Site, Then Automatically Delete the Users Password on Logout?
- AJAX Returning Way Too Many Posts
- Add point on excerpt post
- Where can I find the declaration of `$_wp_theme_features`?
- Loop returns more items than exist?
- How I can add div to menu?
- How to print redirected query string variables to the page?
- Admin-area broken through weird issues
- How to get category pages to look like a certain archive page?
- How to call a specific value within the functions.php file?
- Select area and checkbox data is not saving?
- How to modify this function to exclude also the post belonging to a specific category?
- Suppress errors when using global function
- How to limit the number of posts in the wordpress loop in conjunction with the “download more” button?