2
votes
1answer
88 views

How to filter the description of a custom post type

I understand that although not used by core in any way you can set a description for a CPT: $args = array( [...] 'description' => "My CPT description" [...] ); register_post_type( ...
0
votes
0answers
8 views

Dynamically display custom posts by custom fields

I am an intermediate PHP/jQuery developer and would just need a few pointers in the right direction (a tutorial would be great!) please; I have a custom post type of "Events" - amongst others, each ...
1
vote
1answer
22 views

Filter Posts from the Main Query

I want to conditionally merge a custom post type with my posts post type, based on a custom field. If the field's value is 1, then I want I need those custom posts to appear in the same loop as posts ...
0
votes
1answer
76 views

Exclude Custom Post Type from shared Custom Taxonomy

I have a few custom post types and two of them are sharing a custom taxonomy. Is there a way to list the terms of that taxonomy for only one of the custom post types? At the moment I can get a list ...
0
votes
0answers
17 views

Autogenerated Title for Custom post type loses title when trashed/deleted

I am generating title for a custom post type using the following code. It takes the $fname, $mname, and $lname values and generates a title based on the post. This works fine for custom post creation ...
0
votes
0answers
136 views

using ACF datepicker to filter posts on a page

i’m using a wp-query to display posts from a category on a custom post type page. it works fine, and I’ve been also abble to sort my posts depending of datepicker field called “date_debut”. my posts ...
0
votes
0answers
197 views

Use Ajax To get posts from custom post type?

I am using isotope to show post from post type. But the problem is i have paging and i cannot filter post by using isotope, its only filter in one page, and cannot get post from other page, So, i ...
0
votes
0answers
52 views

Problem with adding values to 'post_updated_messages' filter

I'm having an issue with adding a filter to 'post_updated_messages' that I don't quite understand. I've written a function like so; function acc_course_updated_messages( $messages ) { $post ...
0
votes
2answers
82 views

Create new custom post and post category of same name

I have a custom post type "Product" and want to create a post category "A Product Name" automatically on creation of a new Product so that the post category (not custom post category) would have the ...
1
vote
1answer
174 views

Remove “Get Shortlink” button in admin of custom post type

I want to remove completely this section under my title in my custom post type. (I don't need this because I use this only for content management). With this piece of code I can remove the ...
1
vote
0answers
34 views

Categories filtering in new post

I have a website with post types that have subtitles for movies. That files are on a specific custom post type using http://www.wpdownloadmanager.com/ pro. Because all custom type posts are movies ...
0
votes
1answer
40 views

Hook only specific post type

with this function I change the title of my posts in the posts type 'alternatives'. My problem is that Wordpress changes all my titles now. Does anyone know how I can set this for the specific custom ...
0
votes
0answers
153 views

Jquery/Ajax+taxonomy filter?

I need to create a filter it doesn't really matter wether it's JS/Jquery or Ajax I just think Jquery/Js would be easiest. Either way this is my situation. I have a few custom taxonomies and custom ...
0
votes
0answers
99 views

Populate WYSIWYG field with ACF choice

So, I have a custom post type that uses a flexible content field containing a post object field and a wysiwyg field. The post object is to choose a post from a selected post type. After you choose ...
0
votes
1answer
63 views

Change Custom Post Type singular_name through function/filter

I'm working on e-commerce site using woocommerce plugin. My client will be selling tickets online. woocommerce plugin creates custom post type "Product". I want to change this cpt singular_name to ...
0
votes
1answer
34 views

Restrict a filter to a custom post type. Am I doing this right?

So I had this little bit of code to short a music charts custom post type that all starts with numbers (the trick was to make the 10th position appear last in the list, not between 1 and 2): ...
0
votes
2answers
158 views

Filter posts by tax (dropdown) and meta value

I'm having a page on which all my custom post types are displayed. I now need to add another to the existing ones: $args = array( 'post_type' => 'bkroadkill', 'post_status' => ...
0
votes
1answer
62 views

Debug output during filter execution doesn't work

I'm working on my first Wordpress plugin and am working on my first Custom Post Type. I'm looking to provide some debug output so I can see what kind of data I have to work with. I have the following ...
0
votes
0answers
65 views

Diffrent search templates for different post types

I have a site with diffrent post types. Two of them are the 'post' post type and the other one is 'charity', for both pages I have an index, the normal index.php and a diffrent page template for ...
0
votes
1answer
46 views

Modify a plugin function output from another plugin

I'm writing a plugin for a wordpress site using a page template using WP Types plugin. My plugin adds a shortcode tag. Shortcode tags inside 'the_content' get processed without problem. But this ...
0
votes
0answers
51 views

making a glossary with wordpress

I know that there are glossary plugins in the wordpress repository. This plugins normally searches glossary terms in post content and adds a link to it. But i have not found one, that search and ...
0
votes
0answers
70 views

Set post title and slug from meta fields not working

I have a custom post type where I have the post title disabled. I want to set the post title and slug from some custom fields. I was using this and it worked great, but since I've upgraded by site to ...
3
votes
0answers
93 views

Hooking into wp_export filter for custom post type [closed]

I'm working with a CPT which has 5 taxonomies (tags, not categories). I am attempting to use the wp_export filter. The issue I am experiencing is when the filter is running: it appears to run it ...
1
vote
1answer
77 views

How to use manage_$post_type_posts_columns with underscore in post type?

I have a post type 'job_listing' and I want to use manage_{$post_type}_posts_columns filter in it. I tried manage_job_listing_posts_columns but it's not working because of the underscore in the post ...
0
votes
0answers
173 views

Trying to apply apply_filters to custom post type content - not working

this is kind of a strange request. I have a plugin that adds a custom post type - then the plugin has some settings where the user can select from any of the posts they created (in that custom post ...
0
votes
2answers
229 views

Filtering WP_Query

I'm developing a site that uses a Artist custom post type and I need to query all posts of this type in a page template. I need to set the is_post_type_archive property to true too to filter this ...
0
votes
1answer
333 views

Custom Taxonomy Filter Issues

I have a custom post type with a few custom taxonomies and I am using a piece of code to filter the posts based on the taxonomy on the main edit page using drop-down menus, which works great, but I ...
1
vote
2answers
287 views

WooCommerce product search titles only

I had asked this earlier and solved it using the Relevanssi plugin, however that plugin is now breaking things so I can't use it anymore. How is something so freaking simple made so impossible by ...
0
votes
1answer
94 views

Add html to cpt main page / admin edit.php

I want to add some html under the title of a custom post type I created. See area in image here: http://i.stack.imgur.com/rpkV3.png I tried using different methods including post_row_actions ...
0
votes
1answer
2k views

How to filter posts by categories?

I have a custom post type and now I need to filter the projects according to their categories and without being directed to another page. Also I need to have all category which would show all the ...
0
votes
2answers
479 views

remove custom post type permalink

I've registered post type with following -- $holidayLabels = array( 'name' => __( 'Holidays'), 'singular_name' => __( 'Holidays'), 'all_items' => __( 'All Holidays'), ...
0
votes
1answer
251 views

How does the filter post_updated_messages work?

I'm following a tutorial about custom post types and I am unable to understand how some functions work. Allow me to explain a little more. function my_updated_messages( $messages ) { global $post, ...
1
vote
1answer
152 views

Search filter triggered & sort by custom post type

I am using a plugin (Relevanssi) and a custom function to sort the search results by custom post types (see below). This is working great. add_filter('relevanssi_hits_filter', ...
0
votes
1answer
168 views

How can I add a filter to a particular post format?

I have several post formats and I want to use add_filter selectively, applying the filter to some of the post formats but not all. When I do this in my functions.php file it affect all the post ...
0
votes
1answer
325 views

Catch and display error on save_post action

I wrote this function that adds data to an external db every time a custom post called 'event' is created. How can I prevent the save from happening if this function returns an error? At the moment, ...
0
votes
2answers
145 views

Paginate yearly archives for a custom post type

Here's the code I'm using to create yearly archives for a custom post type: function myquery_custom_post_rewrite( $rewrite_rules ) { $myqueryslug = 'customposttype'; $month_archive = array( ...
0
votes
2answers
182 views

wordpress remove views from action links in a custom post

I have created a custom post type, but I want to remove the View link from actions, in the listing of the custom post. I have tried this snippet add_filter( 'post_row_actions',array(&$this, ...
0
votes
1answer
199 views

wp_query and comment_parent - select only posts with top level comments

I have a custom post type of 'films', and I'm creating a number of search filters using wp_query. All are working fine, but I now need to add in an option of exclude results that dont have any top ...
1
vote
1answer
528 views

Image size filtering in Media uploader according to custom post type

I have three different custom post types which require an image upload in the admin post edit page. Each type has its own image size setting. Let's say: 'news' type => picture size required: ...
2
votes
1answer
90 views

How do I set the link in the Custom Post Type admin menu?

I'm trying to create a custom button and link it to a file within the plugin. How do I get this link pointing to the path of my choice? I've tried the following but it does now work. function ...
3
votes
2answers
1k views

How to order posts of a custom post type by date DESC in dashboard Admin?

I created a new post type named "Video". When I create post for the post type, posts is ordered by title ASC. Is it possible to order posts by date DESC please ? register_post_type('Videos', ...
0
votes
2answers
3k views

Filter by custom Field for Custom post type Admin Listing

I have a custom post type "Article" which has a custom field "issue" that is the id number of a "issue" post type that i am selecting using a simple select box. I want to add a drop down of issues ...
2
votes
1answer
496 views

Taxonomy terms with edit/filter link in wp-admin, in the list of custom posts

I'm using get_the_term_list and manage_posts_custom_column to display the terms of a custom taxonomy in the list of custom posts, in the WordPress Admin. add_action( ...
0
votes
1answer
529 views

Displaying custom taxonomy in the admin list of a custom post type

I'm trying to list the terms of a custom taxonomy ('genre') in the overview table in the admin area for a custom post type ('station'). To get this, I tried the following code in my theme's ...
0
votes
1answer
224 views

Exclude custom function content from certain pages

I have added a small custom function to display a little author bio blurb at the bottom of each blog entry in my functions.php file inside the current theme that I am using. So far so good, it is ...
0
votes
1answer
205 views

How do I filter a custom post type loop by a field?

OK, very simple task, I'm just not good at PHP. I have a page where I want to list some staff using a styled list. Here is the page all working fine, I just need to divide the results - ...
2
votes
1answer
340 views

Adding posts of custom type into the main feed

I'm having some trouble with a subject that seems to be pretty basic, so I'm starting to feel (a little, only a little) dumb :-) Here's the thing: I want my main feed to include the posts and other ...
1
vote
2answers
77 views

How can I run this code once so that my generated post title doesn't keep changing on publish/update?

I have a custom post type called transaction, and on the post type's edit/publish screen I have removed the post title field. The post title is now being generated by the function below, which labels ...
0
votes
1answer
552 views

show most viewed posts of last days by link?

I use this link to get most viewed posts: http://mydomain.com/?post_type=movies&meta_key=post_views_count&orderby=meta_value&order=ASC But that gives me ALL posts from this post type ...
4
votes
1answer
737 views

How to change “Draft” string for status of custom post type to “Unavailable”?

ANSWER MOD: just an important mod to the chosen answer: // check if you actually have drafts; also avoids extra '|' separator if (isset($views['draft'])) { // 'Drafts' should be added (and come ...