If you look at wp_get_archives()
you will notice that the link is generated by get_archives_link()
. That function supplies a filter that will allow you to replace the parens.
This is fairly crude but does work.
function archive_link_wpse_183665($link) {
$pat="|\(([^)])\)</li>|";
// preg_match($pat,$link,$matches);
// var_dump($matches);
$link = preg_replace($pat,'[$1]',$link);
return $link;
}
add_filter( 'get_archives_link', 'archive_link_wpse_183665' );
Related Posts:
- How would you create a “weekly” archive?
- How to have Multiple Archives Widgets, one archive widget per category (in a different page)?
- Display only posts from referred category on date archive page
- How can I get archives for specific category without category_base in the url?
- How we display Archives for specific categories
- Modify text after post count
- Custom archives function
- wp_get_archives() display months even if there is no posts
- How to filter by date & a specific custom post type post-WP 4.4?
- Wrap the “show_post_count” between div
- Get current title of archive.php
- remove 2014 from wp_get_archives
- Get posts from a top category and group by child categories
- How to get post archives urls list without any markup?
- What do I need to style for the page after wp_get_archives?
- Any kind of custom post type in the front page and in the archive listing
- Parent and child relation code and display only first child list
- How to count the number of monthly archive?
- Trying to hide subcategories which have categories without posts
- wp_get_archive for category returning different URLs on different but similar sites
- Exclude a specific category link from archive / front page
- Filter the post listing for a particular category from archive month list
- WP Archive & Category Pages not filtering
- WordPress 3.6 – archive.php doesn’t get triggered [closed]
- Sort results by name & asc order on Archive.php
- Custom Post Type Archives by Year & Month?
- Default archive URL wordpress
- Increase number of posts in archive page
- How to get category and archive title?
- Get rid of WordPress category, tag and author archives?
- How To Create A Paginated List Of All Categories On My Site?
- How do I remove unwanted pages like archive, search, etc.?
- Filtering a custom post type by custom taxonomy in archive template
- Category archive by year with permalink support /category/YYYY
- get_categories for custom post type with a specific custom taxonomy attached
- Why are posts from custom post type not displayed in “category” archive?
- How To Modify The Loop in archives.php To Have 11 Posts Per Page and CSS Styling
- How can I lock down an old wordpress install I don’t intend to update?
- Archive list with only years and months
- Displaying category archive of custom post types
- 404 Error On Category and Tags Pages
- Force WordPress to Show Pages Instead of Category
- How do I place content on archive pages but not on main page?
- Decreasing the Memory Consumption of a WordPress Site?
- What’s the URL for a category archive?
- WordPress Posts By Date/Day?
- How can I get posts in a subcategory to display on it’s parent categories archive page?
- How can I get the Month Name from Archive?
- Preventing 404 error on empty date archive
- is_archive() returns false on the archives page
- What is archive.php used for?
- Archive by Year
- Sort posts by tags in category pages
- How to get the category of the post and link it to the archive (of the category)
- Archive widget – limit number of months to 12
- How do I visit archive-post.php?
- How to hide a specific category posts in my monthly archive?
- Date archives for custom post type
- Optimal way to redirect home page to category archive?
- How do I make wp_get_archives show me months where only pages were created?
- Display posts links from a category group by year
- Display list of Sub-Categories and the posts they contain, within one main Category
- Display all custom post types in archives.php
- Sort custom-posts in archive.php via meta-key?
- Including post_type = ‘wiki’ in author archives
- Use Transient API to cache queries for all posts in all categories?
- Sort category page with custom field
- Archive listing of posts by publish year (multiple years)
- How to create tabled index of posts in a certain category
- Output yearly archive within a page
- Regex problem in an add_rewrite_rule
- Return array of categories to php function
- Sticky Posts Not Sticking to Top of Category Archive
- Display most recent post in category instead of archive?
- Create a month by month archive of pages (not posts)
- Root level category, tag, author and archive pages to work
- Listing all posts from current category on page
- How to show specific year archive into dropdown list
- Single.php Active Category Class
- Display WooCommerce product categories in a 4 columns custom menu [closed]
- Archive filtering posts by year and month
- How to get the date dynamically from archive.php to date.php?
- How to make a custom Archive Page
- Making next_posts_link(); return posts by month
- Category Specific Archive
- Count posts for each year
- How can I change the way dates shown in the archive widget?
- display archive as collapsing links
- how do I get the date in a date archive page
- How can I get the ID for an archive page? [closed]
- Are Custom Taxonomy Templates Possible?
- “Sticky” posts for each category (archive.php)
- get_post_type_archive_link(‘post’) returns current category archive
- if in_category on archive.php
- I want exclude the particular category in sidebar
- How to limit wp_get_archives to show months for the X years only
- Archive in sidebar with dropdown list of Year – Month – Day
- Arrange and separate posts
- How can I organize/create an archive listing by Year and month
- Change behavior depending on content length