As you can see from the source code of wp_get_archives
(line 1791 currently) the query is hardcoded. There is no filter to influence it. This means you have to correct the result afterwards. This is fairly easy if you set echo => 0
in the args, so the result is returned in stead of echoed. Then all you have to do is remove the first link that is returned:
$pattern = "/<a.*?<\/a>/";
$replacement = "";
$archives = wp_get_archives ($args);
preg_replace ($pattern, $replacement, $archives, 1);
echo $archives;
Related Posts:
- Custom Post Type Archives by Date with Custom Permalink
- Make Two Views of Post Type Archive At Two URLs
- Showing only future posts in archive based on custom field date
- Archive template
- Archive list for custom post type categories
- Check if is post type archive and in category
- Not able to see CPT archive template
- Create Archive Page with Visual Composer
- Add archive/category results to single post page
- Not able to see archive page of custom posts
- Archive Custom Post Type
- Custom Post Type archive (archive-{post-type}.php) is not working
- How to display archive page posts based on author_id
- Limiting the Archive page to posts posted by particular author
- Using WP_Query how can I show events (a custom post type) that are in the future?
- Archive-Custom-Post-Type order by Event Date, ASC, and hide events that have completed
- What code do I “comment out” to remove the loop from this Custom Taxonomy
- Group Archive list by posts tag
- Custom Post Archive – display page 1 differently then subsequent pages
- CountUp timer for custom post
- Custom Post Type Archive – archive.php is present, but it is not being used
- Custom post type archive url when post type has archive string
- get custom post archieve by month
- Customing Annual Archive plugin
- Notice- undefined variable post and trying to get property of non-object
- WordPress Rewrite Url with arugments
- How to link to an archive-special.php from a custom front-page template?
- How to get WordPress Time Zone setting?
- How to remove custom post type archive
- How to use a custom post type archive as front page?
- Proper way of making custom post type landing page or archive page
- Get date of last update outside of loop
- Ordering posts having multiple post-meta date fields
- Custom Post Type Archives with 0 Posts Redirects as 404
- Get monthly archives for custom post type
- How to get_queried_object on multiple objects?
- Is it safe to use ‘date_default_timezone_set’ in plugin file?
- Assign Page Template Within A Custom Post Type
- Post type archive page not working
- Custom Post Type – Archive page title
- Getting taxonomy terms used by custom post type
- Removed slug from CPT, now How/where do I hook the filter to the taxonomy term archive pages link?
- Date query not inclusive despite parameter being true
- How to list custom post types?
- Display only post types that are direct children of the current taxonomy
- Custom post type search with slug in URL
- How can I give CPT archive correct body class?
- How to show Published date and/or Modified date
- date() returns incorrect value if used from WordPress theme, but correct otherwise
- display month in french in wordpress/php?
- Automatically Updating Publish Date Bug
- is_page() not working with archives?
- 404 on term taxonomy archive pagination only with some terms
- Get date numerical and separate?
- Custom post type is showing custom home page, not archive page
- How can I show many posts an author has per week?
- URL of a custom post type’s post format archive?
- Create template for taxonomy results limited by Custom Post Type
- How to use has_archive but disable feed per post type?
- Trash / Draft a WordPress custom post after custom date field expires
- Custom Post Type has_archive
- Display a custom posts page for post type
- Automatically add date to the auto generation of post slug
- Is it possible to have a custom post type with feed but without the archive?
- Add parent post to Custom Post Type [closed]
- What’s the name of the custom post type yearly archive template?
- How to display CPT archives?
- current-menu-item not added on page showing custom post type (rendered with archive template)
- Can anyone clarify difference between archive-{posttype}.php, type-{posttype} and date.php?
- How to change the date and time in REST API for comments?
- Permalink problems with custom post type and custom taxonomy
- Use the custom post type archive for taxonomies?
- How to get the Custom Post Type Archive inside a folder
- Conditional: current user updated post in the last X days
- How to add a date creation field when a custom taxonomy relationship is created?
- Custom post type category permalinks and archive pages
- Custom Field Date Problem
- CPT archive with WP native/core tax/categories
- is there a way of getting term children that only shows those from two taxonomies
- How to add specific terms in a custom post type?
- No more get_option(‘date_time’) in WordPress 5.5?
- Why is my archive page looping through all but one post?
- WordPress Page hierarchy ( parent is singular of custom post types slug ) is returning not found
- Can’t add to time? [closed]
- Timezone for Plugin
- How to manage a custom post type archive as a page?
- Change the Page Title of the Archive Page for Portfolio Tags
- Pagination not working on my archive page for a custom post type
- Custom post types not displaying per category
- Custom post type with two templates
- Use the_date with link
- Custom Post type and Custom taxonomy with URL rewrite worked but template did not
- How do you add Author and date Published on Category Pages?
- Change the date and time in wordpress
- Custom post type category page not working
- CPT Archive with parent page
- Adding a class to last post in the_date
- Get system timestamp in wordpress
- Remove plugin’s custom post type archive page and single pages [closed]
- How to customize Date Format for American visitors?