Unfortunately there is no way to nest wp_get_archives
to achieve this, so you will have to build your own loop using get_month_link
Like this (untested, regard this as a starting point):
$year = 2009;
while ($year =< get_the_time('Y')) {
echo '<ul>'
$month = 1;
while ($month =< 12) {
$link = get_month_link ($year, $month);
if ($link != '') {
echo '<li>' . $link . '</li>';
}
$month = $month + 1;
}
echo '</ul>';
$year = $year + 1;
}
Beware that get_month_link
doesn’t test if there actually are posts to display in that month. So the link will never be empty, unless you use the month_link
filter to do that test and in that case return an empty link.
Next you’ll need the css to display this ordered list correctly, but that is not a WP question.
Related Posts:
- Custom post type archive page blank
- How to create archive page to add in menu
- Overriding the template files using a plugin for all themes
- Is it possible to reuse wp.media.editor Modal for dialogs other than media
- How to include jQuery and JavaScript files correctly?
- How can I run AJAX on a button click event?
- How to provide translations for a WordPress TinyMCE plugin?
- Can I use the wp media uploader for my own plugin?
- How-to implement admin Ajax inside an admin WP_List_Table?
- Customizing the 3.5 “Add Media” popup (Backbone.js)
- Test to see if jQuery or Prototype is queued by another plugin?
- Include third party Javascript library which is not included in WordPress
- jQuery in header or footer
- Hook the Keydown Event in the TinyMCE Post Editor
- lodash dependency in a Gutenberg plugin
- wp_localize_script $handle
- How to trap “Publish” button to check for meta box validation?
- Pass javascript result to shortcode executer function
- The changes I make to an external JS file of my WP plugin are only applied after I clear my browser’s cache
- `wp_set_script_translations` with `wp.i18n` does not return translated strings in simple plugin
- Use js script from one plugin in another plugin
- How do I only load js on the post-new.php and post.php pages in admin?
- creating elements/innerblocks via rangecontrol
- Can’t get JS code to work with shortcode
- How do I add a javascript file to all admin pages via a plugin?
- WordPress custom post type archive with description
- Make a list with header and subtext in Gutenberg blocks
- Gutenberg – What is the best way to save/update post meta?
- How to Load Plugin JS in theme’s footer section
- Print WordPress username id inside JavaScript
- Mixing Regular Javascript With jQuery in a Plugin
- How to run a external JavaScript file on wp-admin if admin, and other if normal user?
- creating custom archive template within plugin for custom post type using archive_template filter
- Where to call wp_enqueue_script in a plugin with custom template?
- WordPress Plugin with a shortcode that dynamically generates javascript. Can I use add_action without wrapping the javascript in a function?
- How to prevent UNDO on guternberg block editor
- Creating a custom Gutenberg block with columns
- “import declarations may only appear at top level of a module” when importing WooCommerce API node module
- wp.template() returns tags in Ajax response
- Gutenberg: import dependency or assign from global variable?
- My WordPress plugin cannot load my JavaScript file
- javascript datatables in a plugin
- add javascript files only when plugin is called?
- How can I avoid conflicts between plugin and theme?
- How to control an elements classes from multiple Gutenberg sidebar controls?
- Custom Post Type Archive template page not found
- How should I go about registering JavaScript that isn’t a file? [duplicate]
- What action hook can I use to add a JavaScript to a page post using a theme template that is not including get_header() nor get_footer()?
- should i be checking for jquery before enqueing it in a plugin
- Loading custom js file on the admin page through plugin
- Run JavaScript validation script on form submit in plugin
- Custom Plugin – CSS works, JS doesn’t
- Translate javascript with WordPress built-in localization API for static strings
- Need help about understand api, wp, $ syntax in WordPress plugin script
- How to add a panel/box/widget/are/screen to the right side of edit post/page confusion
- Insert Into Post Not Working For Audio File Using jQuery
- Service Worker Uncaught (in promise) DOMException
- Developing the save function in Gutenberg blocks
- Gutenberg – is it ok to load dependencies multiple times?
- Preventing double loading JS scripts (like React) when developing for Gutenberg
- How to get the Custom Post Type Archive inside a folder
- About a programming language starts with [closed]
- Referencing files in JavaScript in WordPress Plugin
- Should I put my plugin javascript inline?
- Custom post archive page not opening 404 page
- wp.media libary pdf type
- How to overwrite the category template in a plugin
- Query String Filtering API
- Getting incorrect filepath inside custom block front-end output using @wordpress/create-block tutorial
- Trigger function on Remove block or add new block in Gutenberg JavaScript
- Multiple TinyMCE on button click is initialized and appended but why only last one is writeable?
- HTMLCollection not counting right in editor? / for loop not working on elements in DOM
- converting a node.js project into a wp plugin
- What happens/fires when you select a block in the editor?
- Is “document loaded” different on admin side than public side?
- why is apiFetch throwing Unhandled Promise Rejection: TypeError: Object is not a function
- jQueryUI draggable doesn’t work in WordPress plugin
- Load script on frontend from widget plugin
- WordPress with React: Saving and Using Data Collected with fetch
- Append php file to footer
- XMLHttpRequest to open PHP file responds with Missing Page
- Replace the WordPress Media Library Uploader
- Change Title Based on Taxonomy Filter in archive-{cpt}.php
- Using JavaScript in WordPress page to call for server data using AJAX
- Filterable posts using categories
- Add a Script button in W3 Total Cache plugin not working due to conflicting jQuery version
- Uncaught ReferenceError: kpoejy is not defined
- Remove from a div by class name from post page if post author role is not administrator
- Display custom post type archive on page.php template
- Use different archive template for plugin
- On one of my sites a file is shown as 404 but the file IS there
- What method would I use to show an image in between X amount of posts on category archive? [duplicate]
- How can i add insertion point between inner blocks in my custom block like core blocks
- How do I access the contents of WordPress Classic editor in admin area with JavaScript?
- How to get the value entered in the input field in wordpres
- How can create a custom plugin to call my webapi after any registration or membership plugin functionality
- Insert meta-description into Yoast-SEO input-field via JavaScript
- WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
- Reinitiate Gutenburg’s blocks using javascript
- how to add contact form 7 shortcode in javascript variable