Please see this documentation for the usage about the_time()
. You are not supposed to add html inside the parameter of the_time()
. (edit: use get_the_time()
with in string concatenation)
To solve this, try this code:
echo '<div class="post_date"><div class="month">'.get_the_time('F').'</div>'.'<div class="day">'.get_the_time('d').'</div><div class="year">'.get_the_time('Y').'</div></div>';
edit: corrected to the use of get_the_time()
Related Posts:
- Twentytwenty theme p-tags break em- and strong-tags that span several paragraphs
- Why doesn’t default WordPress page view use force_balance_tags?
- Hide a div that is part of all pages on one specific page
- Can’t get staging site to display same way as live site. Completely stumped
- Theme Check gives: Required: This theme doesn’t seem to display tags?
- Snippet: Use classes instead of inline styles for text alignment
- How do I hide tags that have only been used once?
- How to check if post has any tag?
- Is there an error in get_the_tag_list()?
- Change date number to another language/script?
- What are the Theme tags in style.css used for?
- How to set dimensions of the post thumbnails (featured images)
- Any tag pagination page (except the 1st page) loads index.php template instead of tag.php
- Where is definied the theme location for the main menu in a WordPress template?
- What tags should be used for themes to show the type of layout?
- How to prepare the HTML for WordPress [closed]
- Using wp_tag_cloud(‘format=array’) to print tag names without links?
- Force Balance Tags not working
- What’s stopping my HTML from rendering in my template parts?
- Is it possible to include an HTML flat-file website inside a WordPress theme?
- Is there any tool to find lines of codes responsible to generate front-end HTML elements?
- Tag Page Not Listing All Posts With Tag
- Add tags to pages
- I used single quote to design HTML of my WordPress blog. Now site redirects to index.php everytime than page.php or single.php
- Theming Using Bootstrap Glyphicons and WordPress Dashicons
- Random white space before doctype
- Why tags are displayed bellow the content and not inside
- How can I compare publish and update dates for a single post?
- How to call the_time current?
- How to safely return the HTML?
- Get Post’s Excerpt Without the Wrapping tags and the Read More link
- Why Tags don’t appear in my page?
- Converting a static HTML template into a WP theme – How do I specify page content?
- multiple html/css files for wordpress theme?
- Why I obtain different visualization when I run the website on my local machine and on remote server?
- Some doubts about WordPress handle the horizontal main menu visualization
- How to create a WP theme that use BootStrap? [closed]
- my single.php is mixup on some post for no reason
- Does wordpress add their own classes into nav menus?
- Social-Link block not loading html on page with custom theme
- How do I change the color of individual page titles in WordPress?
- Whether an tag is required in header?
- Why .widget-area is outside of .site-content in Underscores starter theme?
- Why the slideshow is not shown in my theme?
- Theme customizer live preview JS- Trying to bind to an html image url without luck
- Standard Way To Do Custom Work Within A Page?
- Displaying Tags for the Page I’m On?
- How can I get rid of the distance when I’m using list-style-type: none? [closed]
- HTML to WORDPRESS [closed]
- Which function(s) to build a paged HTML table
- Is there a way to prevent wp_head from outputting self-closing tags?
- Dynamic nav menu with icons [closed]
- How To Add New Option Types To Option Tree?
- How to limit wordpress menu depth in admin panel
- Trigger Customizer saving process with Javascript only
- Comment form not display properly?
- How to add menu support to a theme?
- Registering Sidebars and Sidebar Widgets. Sidebar Widgets Not Displaying
- Extend walker – navigation, adding data attribute to a tag
- How to display category specific post content on a page
- Gutenberg Reusable Block as part of WordPress Theme page
- Why is $GLOBALS[‘content_width’] needed if site is responsive?
- Does WordPress count as a means to learn web development? [closed]
- current-menu-item class not working
- Prevent theme from activating [duplicate]
- Messing up with transient API – getting flushed on refresh
- Correctly using wp_head()
- Cannot figure out how to overwrite files in child theme
- Problem with empty class attributes when running a filter on nav_menu_css_class
- Limitations when modifying wp_title with a filter
- Pass variable to hook. Its possible?
- Q: How to pull data from custom table to populate zustomizer setting/control select options
- The ‘default’ attribute from $wp_customize->add_setting() method not in db?
- How to remove header image in Twenty Eleven theme?
- Will my site get messed up when the wordpress theme updates if I edited the html code in the editor to change footer?
- Have the homepage look different to index.php without a static page
- How to style bootstrap container in wordpress theme?
- Wamp Server error on running wordpress theme on localhost. How do I fix this error? [closed]
- $_POSTing to and modifying the WP search results page
- Confused by the behaviour of “front page” / “home” templates
- How to Grab first Image from some Chosen Categories
- Get themes’s images path in WordPress Multisite
- Get video from the post on homepage
- WordPress Themes Directory: Template which hits the standards?
- get_avatar() is not working in my custom theme
- When I save changes for css and js in my WP localhost env windows 10 the changes don’t take effects immediately!
- Updatable theme developing
- makeing a terms of use page that is part of the theme
- Child theme in separate WordPress Install
- Display problems in admin dashboard when creating a new theme from scratch
- Using Customizer value in an external PHP file inside a theme
- How to avoid Ajax in wordpress theme in making mulitple request?
- WordPress 3.5 + Foundation 5 not working on IE9
- Using wp_enqueue_script with social media buttons?
- Want to include ad code after related post
- How can disable function wp_link_dialog()
- Pagination adds product to cart Woo-Commerce
- Onepage with shortcodes
- How to set up a development/staging site to make major changes to the theme then update on the live site?
- What is the point of using the front-page.php template? [closed]