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?
- Archive page for custom post type shows regular posts, too (by category)
- How to create archive child pages with good Yoast SEO meta?
- 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?
- Converting timestamps to local time with date_l18n()
- Custom Post Type Archives by Year & Month?
- Proper formatting of post_date for wp_insert_post?
- Get custom post type slug for an archive page
- Create a custom archive page for a custom post type in a plugin
- Unable to select an old date in wordpress
- How to get date for each post?
- Custom Post Type Settings page, choose page to display archive
- Adding a menu item for a Custom Post Archive
- Custom Post Type Archive Page not showing
- Adding custom post type archives to a WordPress menu
- Order by meta value or date?
- How to set a custom post type to have viewable future posts
- Custom Post Type Template – Archive
- Page Template as Custom Post Type Archive
- What’s the difference between get_the_time and get_the_date?
- Default timezone hardcoded as UTC?
- Custom post type yearly/ monthly archive permalinks
- How to convert DateTime() to display time based on WordPress timezone setting?
- Can’t get post id on page that is a custom post type archive
- Custom Post Type Archives by Date and Taxonomy
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- How to rewrite slug of custom post type archive page
- How to schedule multiple posts while adding new
- How do you create an archive for a custom post type from a plugin?
- pre_get_posts with tax_query causes empty result
- How to List Events by Year and Month Using Advanced Custom Fields?
- Proper way of making custom post type landing page or archive page
- Sort Custom Post Type Archive by Taxonomy Term [duplicate]
- Get date of last update outside of loop
- order posts by date like craigslist
- PHP function showing wrong time in WordPress
- Show modified time if post is actually modified
- Running WP Cron on specific local time
- Sorting a query by custom field date
- How to List All Custom Post Types Names (Not Posts)
- human_time_diff() returns “48 years ago” for all comments
- Ordering posts having multiple post-meta date fields
- How to seamlessly redirect between different archive and singular slugs?
- Set Custom Post Type title to the Post’s Date
- Change title in head on Archive page
- Using WP_Query To Get Posts Randomly From today
- Archives for custom post type based on a “date” meta value
- Custom Post Type Archives with 0 Posts Redirects as 404
- WordPress Custom Query to show posts from last x years
- How to filter custom post type archive by meta value
- What are the advantages of using a custom post type archive?
- Page is defaulting to archive page and not designated template
- custom post type archive page url to point to Page permalink
- Why time functions show invalid time zone when using ‘c’ time format?
- Convert jQuery Datepicker Format to SQL Date Format
- Whats the way to format a date after using get_posts()
- Converting Unix timestamp to wordpress date
- “Edit” option for custom post types archive page
- How to display date such “x ago”
- Change number of posts to show on Archive page (custom post type)
- ACF datepicker meta_query Compare Dates in m/d/Y g:i a – Not in Ymd Format
- Date, Time, and Timezones
- What is the best workaround for supporting all existing DATEs?
- change the comment time output to: X time ago instead of actual date and time
- Custom Post Type archive as front page
- How to get year, month and hour in WordPress?
- Date format with genitive case of the month name is not working
- Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?
- Custom Post Type Archive in Sub Folder
- Display last login time
- Get monthly archives for custom post type
- Is it possible to remove the posts_per_page limit on a specific post type?