The filter is post_type_archive_link
, defined (WP 4.1.1) on line 1112 of file wp-includes/link-template.php:
apply_filters( 'post_type_archive_link', $link, $post_type );
And the use:
add_filter( 'post_type_archive_link', function( $link, $post_type ) {
//Do something
return $link;
}, 10, 2 );
Related Posts:
- Adding a drag and drop re-ordering from a custom post type default list [closed]
- Multiple post types in archives (filter?)
- Remove “Get Shortlink” button in admin of custom post type
- Modifying date filter on admin page for custom post type to link to custom field
- Why is conditionally loading a custom plugin’s code only on a specific custom post type causing the site content to disappear?
- Filtering WP_Query
- Filter Posts from the Main Query
- How can I add a filter to a particular post format?
- Is there any way to get list of all possible filter hooks for all post types?
- sortable columns for multiple custom post types not working
- How do I add custom HTML to the content of an archive page’s posts?
- Only show posts with a specific term of an associated taxonomy in a custom post type archive
- Catch and display error on save_post action
- Is possible register two archive pages for single custom post type?
- Best way to fix bad count on All | Mine | Published
- Store a value in global scope after init hook is fired
- Dynamic page for nav items used as filters
- Adding Information To All Posts Screen
- Filter Content on all Post Types
- Hook only specific post type
- Change CPT Edit Target Link for Admin List
- Saving Taxonomy Terms
- Filtering a custom post type by custom taxonomy in archive template
- get term archive url / link
- How to get the custom post type from an archive page?
- How to remove “Archive:” label from archive title
- Proper way of making custom post type landing page or archive page
- How to correctly get post type in a the_title filter
- How to add a button to custom post type’s posts-page
- How to add a CSS class to every image in a Custom Post Type
- Best way to filter featured image text for a custom post type?
- How can I get next/ previous post links to order by a filter (by the last word of the title)?
- flush_rewrite_rules on save_post Does Not Work on First Post Save
- Display Editable Text Above CPT Archive Listings
- post_type_link filter causes 404 on the CPT page it’s used on
- Ajax filter with custom taxonomies
- Filter posts with ajax form and checkboxes
- paginate function in archive for custom-post-type
- Help with issues on “Adding a Taxonomy Filter to Admin List for a Custom Post Type?”
- Used with meta_query in query_posts works slowly
- How to create archive page for taxonomy terms within custom post type
- Category and post tag archives do not include posts from custom post type
- How do I set the link in the Custom Post Type admin menu?
- How to list custom post types?
- Display CPT description on archive.php pages for all CPT
- Set a default category – if the user didn’t select one- before creating a post
- Make a function to run only for CPTs
- Pre_get_posts filter overwrites all search functionality
- Validate custom fields before save using WordPress Rest API
- Append date to custom post type url slug
- Custom Post Type Archive Page Filtering
- URL of a custom post type’s post format archive?
- Create template for taxonomy results limited by Custom Post Type
- WordPress sort search results by custom order
- How can I made custom taxonomies relationship?
- WooCommerce sort products by the actual product width(not the shipping width)
- Is it better to use filter for the_content in archive pages?
- Create new custom post and post category of same name
- Archive not sorting correctly
- What’s the name of the custom post type yearly archive template?
- multiple custom post type on category page
- Use remove_meta_box conditionally on custom post type
- How do I amend form data before it is saved for a custom post type
- Custom taxonomy or custom page templates?
- Can anyone clarify difference between archive-{posttype}.php, type-{posttype} and date.php?
- Use the custom post type archive for taxonomies?
- How to constrain the results to a specific post_type on tag archive page?
- Creating alternate meta box context locations
- Filtering the_content, but still need to display the unfiltered content inside filter
- How can I tell if I’m on a custom post type archive page?
- custom filtering admin columns
- Ajax Post Filter | Split Taxonomy Into minPrice & maxPrice
- Query filter by value in meta_value array
- WP Admin Dropdown List Filter for custom (ACF) field on custom post type(s)
- Post Click Redirect to Custom URL instead of Single Post Page
- Custom WordPress theme not displaying posts from category
- Creating an archive page or simple template to list all values of a custom field of specific post type listing
- Hook create / update post
- Order archive custom posts by taxonomy term [duplicate]
- call a function when insert and update a custom post type
- Custom Post Type tag taxonomy “Page Not Found”
- do action inside a class is not working
- Dropdown switching subcategories portfolio
- Custom Post type archives / categories give 404
- Sorting on Taxonomy in archive page
- Filter custom post type by tags
- Custom Search Template for Custom Post Types
- Archive.php is not displaying tags
- Custom post type category page not working
- paging is not working properly on news archives page [duplicate]
- Categories in custom post types
- is_singular won’t call my functions?
- How to turn custom-post archive into an overview page, listing the metadata of the posts?
- how to pass args for archive.php query?
- Remove plugin’s custom post type archive page and single pages [closed]
- add comments custom fields after user is logged in
- Rewrite a filter as shortcode (or something like that) to use anywhere in CPT
- add_filter > posts_where works partially
- Filter page ID outside the loop and order
- Paginate yearly archives for a custom post type