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]
- What is the difference between HTML tags and ?
- Adding attribute in jQuery
- Stray end tag “head”
- Menu items description? Custom Walker for wp_nav_menu()
- How to define and link full path to css located at a random folder on header.php
- Sizing screenshot.png without losing aspect ratio
- Software for WordPress Theme and Plugin Development? [closed]
- When to use is_home() vs is_front_page()?
- What is the preferred way to add custom javascript files to the site?
- Get the blog page URL set in Options
- How to create .pot files with POedit?
- How do I get the theme URL in PHP?
- Why when I submit a form in wordpress it loads a 404 page though URL is correct
- What is the constant WP_USE_THEMES for?
- Worthwhile to restrict direct access of theme files?
- How Do I Protect My Premium WordPress App Theme from Copying?
- How to detect mobile devices and present them a specific theme?
- Using wp_add_inline_style without a stylesheet
- How to add posts to custom menus?
- WordPress Theme Preview Image
- How To extend WP_Customize_Control
- What is the difference between front-page.php and home.php? [duplicate]
- How can I get page slug
- Does the functions.php file ever get called during an AJAX call? Debug AJAX
- When to use _e and __ for the translation?
- What is a Theme textdomain?
- How to show a custom meta box on the “Quick Edit” screen?
- How to add CSS class to custom logo?
- How to add custom css file in theme?
- How important is it to enqueue a theme’s stylesheet?
- CSS not updating in browser when I change it
- Display Search Result Count
- wp_nav_menu(), how to change class?
- theme path in javascript file
- Is wp_is_mobile() effective?
- Display Menu Name using wp_nav_menu
- Making update notification functionality for my themes
- What questions do you ask when asked to give an estimate on theme development?
- How to remove dashicons.min.css from frontend?
- How do I remove a pre-existing customizer setting?
- Minimum Template Files for Theme Development
- What’s the difference between home.php and index.php?
- pass object/JSON to wp_localize_script
- get_template_part vs action hooks in themes
- Theme Activate Hook
- Solutions for generating dynamic javascript / CSS
- wp_redirect() – headers already sent
- Can I create my own “Recent Posts” widget or customize the existing one?