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]
- Get rid of WordPress category, tag and author archives?
- How To Create A Paginated List Of All Categories On My Site?
- How can I lock down an old wordpress install I don’t intend to update?
- 404 Error On Category and Tags Pages
- How can I get the Month Name from Archive?
- Archive widget – limit number of months to 12
- Display all custom post types in archives.php
- Output yearly archive within a page
- Sticky Posts Not Sticking to Top of Category Archive
- Listing all posts from current category on page
- How to show specific year archive into dropdown list
- How to make a custom Archive Page
- I want exclude the particular category in sidebar
- Arrange and separate posts
- What type of page should i use? static page or category page? and what’s the difference? [closed]
- Dropdown category filter
- if there is only one post in the category, directly open
- Multiple filters for wp_get_archive
- How to disable monthly archive
- Sorting posts by season
- weekly archive for custom category
- just can’t get date-based archives per post-type to work
- How to Create Custom Archive page
- How to show year/month archive including months with no posts
- Displaying Archives List
- Category index featured image
- Get parrent category name
- Custom archive.php: retrieve right post categories?
- If one taxonomy contains the same term as another then display post
- Yearly Archive for Categories with dropdown
- Checking if a specific date archive is being displayed
- How to use an array of categories as a dropdown?
- Is a list page usually called an archive page in WordPress?
- Archive page showing wrong month
- Create an archive listing based on meta array
- Can’t Access Sessions or Variables through pages
- How to make an archive page template using WordPress 3
- Use premade array as categories in wp_query?
- How to Get The Excerpt of the page that displays Blog Posts
- Where is the content that is outputted by get_the_archive_description()?
- Image loading function not working on archive.php template
- Get latest post from categories
- Combining custom taxonomy posts with default posts on one archive page
- Create a custom URL for blog archive
- Archive Template being used instead of Category Template for Custom Post Type
- Custom archive pages without “the loop”
- Menu’s breaking, now showing all page links on site
- How to get type of archive whether it is post or date or category archive?
- How can I create a master archive?
- Highlighting Current Category in the Archive and Feeds page
- Woocommerce. Get a list of products in the current category on the archive page and product page
- Different post slug based on archive
- Get an array of the number of post per year of a custom post type (WordPress)
- Link to index.php from home.php?
- I want to be able to access archives to see how recently a post has been read: How can I do that?
- Woocommerce product not appearing in category list page when created programatically [closed]
- Meta Box: display single image on an archive-template
- show image gallery in archives or category page
- Customizing the output of the archive and category widget without altering the original behavior of the widget
- Cant get unique_array() work on get_the_category() foreach loop
- Show full category tree for a year with all post titles?
- How to display total views of all posts of one category?
- Archives widget doesn’t work?
- Archive sorted by month – separate
- Yearly Archive Page?
- Transfering static site to wordpress and retaining category by month paginations
- date.php shows only three posts’ title. how to fix it?
- How to set a link to custom archieve page
- Search tag within category
- dynamically filter by category via sub-menu
- Determine the category that an archive-page is for
- Easiest way to display post archives in category-then-alphabetical order?
- How to define category ID in an array?
- AZ Directory posts directory index
- Category archive page has two URLs even when default theme is active with no active plugins
- how do I exclude a category foreach