As @bonger commented, there is no custom post type filter despite what you’ve read.
To use this filter for a specific post type, the best way is to use the post_row_actions
filter and then test against the passed in $post->post_type
.
I’ve used the code below to add links to the actions row for a specific post type (in this case, myposttype).
This will need to be edited to work for your own post type, and obviously for the new link to actually do anything more code is needed, but this is the idea:
function my_duplicate_post_link($actions, $post)
{
if ($post->post_type=='myposttype')
{
$actions['duplicate'] = '<a href="#" title="" rel="permalink">Duplicate</a>';
}
return $actions;
}
add_filter('post_row_actions', 'my_duplicate_post_link', 10, 2);
Related Posts:
- Remove slug from custom post type post URLs
- How to get post content by calling ajax?
- How to show all posts of the category in wordpress?
- Fetch All Posts (Including Those Using a Custom Post Type) With WordPress API
- Get category id from post id of a custom post type
- How do I add a new custom post format?
- Limit widget to a specific registered sidebar
- WP_List_Table Inside Metabox Not Working on Submit
- Edit the “Post updated. View post” link
- How to hook get_terms() to only show count of posts that have custom meta
- Why is the »_builtin« parameter not advised in »register_post_type()« for custom post types?
- How Can the Users Make a “Playlist” of Posts?
- Create Post tabs in single-{content-type}.php with Custom Field values
- How to let custom post type posts show in standard post archive (like in homepage)?
- Rewrite custom post & taxonomy to share same URL path
- Missing the first 6 Posts and displaying posts that are after the latest 6
- Add extra parameters after permalink?
- How do I check if a posts status is set to draft or pending?
- Adding Custom Taxonomy to WordPress default Post type
- Post type hierarchy
- get_template_part for custom post type content not working
- WP_Query is printing out only one post when posts_per_page is set to multiple
- How to get all posts except for one post from a certain custom post type?
- count_many_users_posts except current logged in user?
- Exclude child pages from archive.php
- Find the user who initially created the post
- Is there a way to have the view link on manage posts page to open in a new window or tab?
- Using The REST API How To Pull All Custom Posts?
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- List children on child post
- Restrict custom post type from appearing with ?post_types=
- How do I do this with WordPress? Taxonomies?
- List custom taxonomy specific to one custom post type
- Display Ad on Specific Categories
- Add custom post type settings to wordress default posts
- Show titles, date of all posts on single category page
- Side effects of Script and Iframe in post
- Set up post page like JAMA articles
- Shortcode not working with post counter
- Changing default ‘posts’ parameters with register_post_type_args
- Allow users to create posts without logging in?
- Some posts from custom post type to subdomains
- Check post on publish for blank title
- Different Limit number of post on different archive page
- How to change “post_class()” for a custom post type?
- Help With Warning on creating new Post types?
- Including link to custom post type in ‘wp_list_pages’ function
- Get an array wich contains the post_name of every post that has the custom post_type “pelicula”
- Custom post types and ‘new WP_Query’
- Showing custom post type categories in the menu
- Stores category posts in an array
- I can no longer post or even save a draft, getting the error “A post type mismatch has been detected.”
- Dynamic pages for linked categories and content
- Separate Content from gallery (custom post type)
- How to set the mainpage of a custom post type?
- displaying content of custom post type
- How to query Posts from a custom post type which contains a custom taxonomy?
- Display post from custom post type
- Custom post type title of each author in his own post
- Does “Custom Post Type” can have page hierarhy option?
- How set template for “custom post type” individual post
- A sports wordpress website
- Custom Posttype URL
- Display custom post front end filter by ACF equals current user
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- Settings -> Reading -> Posts Page ->Blog — is not working in my website
- Is it possible to get the specific content on the search page?
- How to mass get post editor URLs
- How to create additional rendering for custom post types?
- SELECT custom post type and its meta in SQL
- How do I find the count of the current post?
- how to display posts content on the custom css popup by clicking on each title on the sidebar?
- How do I insert a custom post type query after a certain number of recent posts and then resume recent posts?
- Adding specific custom fields (images) to post excerpt
- How to create editable sections in wordpress?
- Instructor can view, edit, delete only theirs courses
- Add input radio menu to post
- How to properly get the wp_postmeta.meta_value of a custom post type in specifics?
- How can I group by Taxonomy on Custom Post Type while filtering out based on custom Meta
- subtracting the current post form then whole loop, which is generating all CPT titles
- How to manage a dynamic multi-level page hierearchy system?
- Assign for all post of a post type a specific single-post template
- Custom Post By Category
- Widget area for individual posts (custom post type)?
- Change Custom Post Type to Post + Category
- update a posts of other custom post type
- Get post from Category by Priority
- Show custom post type under last posts configuration
- Cannot use pages created on WP
- Custom Post Type used for FAQs Accordion
- How to Associate Posts with Pages
- delete custom post type using a submit form
- Custom Post Type children and grand-children in one list
- Why are my wp urls showing page not found?
- Post content stays the same but permalink changes ?
- Can I set a CPT title field to a dropdown with preset options if user is of a given type?
- Styling first post using Advanced Custom Fields
- How do I display the index position of a post from a custom post type?
- How to get permalink of post based on post name?
- Two pagination in one page without AJAX