The tag has no wiki summary.

learn more… | top users | synonyms

5
votes
3answers
2k views

Use register_post_type() to modify an existing post type

There are lots of situations where a theme or plugin registers a post type and you want to modify it. There is of course add_post_type_support() and remove_post_type_support(), but those don't give ...
5
votes
2answers
135 views

Per Post Type Revision Numbers

In wp-config.php you're able to change how WordPress deals with post revisions. Specifically you're able to turn them off or specify a max number of revisions. I'd like to be able to set a max number ...
5
votes
2answers
843 views

Are captions stored anywhere?

In regards to my previous question about shortcode captions, it doesn't appear to me that the actual text of a caption is stored anywhere other than in the post content within the shortcode itself. I ...
4
votes
2answers
98 views

How do I create a link that will always show the latest post?

If I want to create a link that will always show the latest post how can i do that? Lets say I have three post types and there are three links with posts names (like a nav list) to those post types. ...
4
votes
1answer
104 views

Exclude top-level pages from search results

With the following code I can exclude all posts and pages that are top-level, but I would like to apply this only to pages, not to posts (but I still want all posts in the results): function ...
4
votes
2answers
987 views

How to get attachments for a specific post type?

I have this page where I am showing all post's attachments. This is the code: <?php $args = array( 'post_type' => 'attachment', 'post_status' => 'published', 'posts_per_page' ...
4
votes
1answer
643 views

WP_Query ignores post_type in category view

I have following query to select posts by my custom post-type. This works fine while being on the frontpage (the snippet is included in the sidebar). As soon it gets executed on a category page the ...
3
votes
2answers
114 views

Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?

I am building a theme in which I have a post type, which will have an archive in a grid layout. You're probably thinking, "Just use the CPT archive!" Well, there are some cons to that method that I'd ...
3
votes
1answer
516 views

Search through custom post type and custom fields takes 5 minutes

I got strange problem and im stuck. I have custom post type with around 15 custom fields. I moved data from old db (not wp) by using wp_insert_post ,update_post_meta and wp_set_object_terms. All ...
2
votes
3answers
6k views

Custom post type pagination 404 fix?

Been trying to get this working all day but haven't had any luck... I have a custom post type called 'news' and an archive template (archive-news.php), here I'd like to show 2 posts with pagination, ...
2
votes
1answer
2k views

Including post_type = 'wiki' in author archives

For a user with wiki-update permission only, I want to list their wiki articles in the author archive page. Currently, it comes back with "NOT FOUND Apologies, but ...". I am using the Twenty-ten ...
2
votes
2answers
244 views

How to output content based on same custom taxonomy?

I have been trying to output content of all post-types (Posts, Pages and CPTs) based on a term of a custom taxonomy that they must share (meaning if they don't share that particular term, the output ...
2
votes
1answer
157 views

Is it possible to request several post types from a feed?

If so, how should the query URL be formatted? I've tried: post_type=cat1&post_type=cat2 post_type=cat1,cat2 post_type=cat1+cat2 This bug report says you could use ...
2
votes
1answer
99 views

Adding a term name from a custom taxonomy assigned to a post link displayed by a wp_query loop based on another taxonomy

I have registered a custom post type "Animals" and also two custom taxonomies ("Vertebrate" and "Type") assigned to it, which have their own specific terms, for "Vertebrate" it will be "Mammals" and ...
1
vote
2answers
3k views

Get list of all registered post types slugs

I'd like to get a list (array) of all the post types I registered. Precisely I would like to retrieve their slugs. Could someone help me? thanks!
1
vote
1answer
284 views

custom post types don't appear in RSS

I created custom post-types in my site but these posts are not shown in the RSS. Only the regular posts appear there. What could be preventing them from showing up there
1
vote
2answers
71 views

wp_list_filter() and supports

I'm testing the function wp_list_filter(), basically I want to know if post_type has some specific feature before making stuffs. So I end up with this: public static function ...
1
vote
1answer
2k views

Gel all image from certain post type

I've found similar questions here, however I can't modify the answers to get images only from a certain post type - as the post type in those examples are "attachment" and not the name of a custom ...
1
vote
2answers
1k views

How do I search inside specific taxonomies in Wordpress

I am trying to search for posts in specific taxonomies but any time I search, I get results from all the other pages instead of Wordpress searching within the selected category in the taxonomy. I ...
1
vote
3answers
546 views

Is It Possible To Have Shared Wordpress Custom Post Types?

I am developing a website for a record label and the basically it uses quite a few custom post types for various pieces of information. My problem is that I feel the same bits of information are being ...
1
vote
1answer
357 views

Custom dashboard menu does not stay open for the custom Taxonomy within it

Short Version: Custom menu with a custom post type that supports a custom taxonomy. The custom post type works, the menu for it works and stays open. The custom taxonomy works, but the sidebar menu ...
1
vote
1answer
41 views

child of post type (custom)

I registered a custom post type (foo) with register_post_type, setting 'hierarchical' => true,so now when I want to use it I have post_type=foo. How can I query child of foo? any ideas? thanks!
1
vote
2answers
174 views

Query reset problem or flawed code to enable custom post type query

After reading through here and trying various options, I am finally able to get my custom post types 'testimonial' (created with product 'Toolset') to show along with my standard cat/tag queries ...
1
vote
1answer
148 views

how to fetch the meta field keys/meta boxes from a post type?

I need to find all the meta keys or meta boxes preferably from just a post type ...couldn't find any wordpress function to do this. Any custom queries?
1
vote
1answer
2k views

Use get_post_types to query only custom posts types

I need to query only custom posts types - that is all post types in my WP install excluding posts and pages. I have used get_post_types to build a string of all custom post types which I want to ...
1
vote
3answers
2k views

Move value from one meta key to another

Migrating question: How would I structure a MySQL query to move the value from one meta_key to another meta_key? eg: I have an old meta_key of "guest_sort" associated with "posts" to ...
1
vote
1answer
66 views

How do i know the current post type when on post.php in admin?

Im trying to do something with an admin_init hook if - and only if - the user is editing a post (post.php) with post type "event". My problem is that, even though wordpress points to a global variable ...
1
vote
0answers
59 views

How to build a simple nav system of custom post type categories and its posts?

I've been searching the web for a long time now, but couldn't find a solid simple anwser to, what seems to be a basic question: I have to output a list of custom post type categories and the posts of ...
1
vote
1answer
110 views

Post types - Normal Post - Image

I use the ios app to administer my blog. On occasion I also post life pictures up. Question is that when I post an image up from my iPhone the type (image) is shown in the list of post titles. I ...
0
votes
2answers
189 views

Is it possible to filter the display name for post formats for display in the Formats meta box?

I've got a few special needs in terms of post formatting, but do not want (and cannot) break out of the standard Post Format paradigm per best practices. I've come up with a mapping of WordPress ...
0
votes
2answers
516 views

How to edit default post settings

I want to delete content block and add custom fields for image, like on this screenshot. I don't want to add custom content type, I just want to edit defalt post type. Any solution?
0
votes
1answer
44 views

Custom Post Type causes Page Not Found

I found a basic tutorial online which gave the rundown on how to create a plugin from scratch and sets up a new custom post type. I could not find any basic coupon plugins that accomplished what I ...
0
votes
1answer
50 views

How to Set Taxonomy Object Description?

I noticed when dealing with Post Type Objects (Using get_post_type_object();) and Taxonomy Objects (Using get_taxonomy();) there's a property called "description". How do you set this description ...
0
votes
2answers
65 views

Show only public custom posts in home page

I am working on custom post types. Presently we are using below code to display all custom posts in home page <?php $args = array( 'public' => true, '_builtin' => false ); ...
0
votes
1answer
17 views

Adding in support thumbnail removes editor

I have created a custom post type. And on the custom post type I would like to have a featured image. I have added the featured image to my custom posts however when I do this it removes the main text ...
0
votes
1answer
106 views

why there are so many posts whoes post_type is revision? will these records waste too much database space?

from the following data we may know there are only 30 records which are meaningful, and there are 92 records of revision post_type which can not be shown on the blog. so will these records waste too ...
0
votes
1answer
345 views

Define add_editor_style to specific post types?

I am wondering is it posible to define add_editor_style to specific post types? Currently I am using this function.. // EDITOR STYLE add_editor_style('editor-style.css'); But I would like have ...
0
votes
1answer
42 views

Post type no single page

I have created a post type and I am trying to create a single page for that post type, I am creating a php file called single-job.php and it is using the index.php as a template. Below is my function ...
0
votes
2answers
140 views

Replace Post-Title with variable

I want to set a custom post-title with a custom-field meta in my Wordpress Theme. The user will add a new post to the post-type. When they do they will only see the "Title", "URL", and "Publish" ...
0
votes
1answer
69 views

Custom filter for main search: how to exclude specific post_type from search results

Is there a way to use WP_Query's method, set(), in order to exclude a specific post_type from a global search. Here was my unsuccessful attempt: function _search_all($query) { ...
0
votes
1answer
73 views

Why is the post type on the search result page random?

So I think I might be doing something fundamentally wrong in my Wordpress themes since this issue seems to crop up every once in a while and I don't know why. So basically I created search.php and I ...
0
votes
1answer
201 views

wp_list_pages() refuses to output posts

Someone help me understand why the following do not output anything: wp_list_pages( 'post_type=post' ) wp_list_pages( 'post_type=event' ) Yet the following work as expected: wp_list_pages( ...
0
votes
1answer
501 views

Grouping post-types in loop

When a user selects a specific category from a drop-down a list of multiple post types is displayed. I'd like to display the data in groups with the post-type title above in a heading. I'm unsure how ...
0
votes
1answer
25 views

Post types translation

I try to translate post types names (Post, Page and Attachment). I have the following code: function create_skip_post_types_box () { $post_types = get_post_types(array('public'=>true), ...
0
votes
1answer
215 views

Custom wp_query differs on index page and category page

I've been banging my hand against the wall for a little while now trying to figure this out. Can anyone explain to me why this custom wp_query prduces two different sql statements, one for the index ...
0
votes
1answer
729 views

Add filter to Admin list for all custom post types by their custom taxonomies

I want to add filter on every Custom post type that have taxonomy associated with it. I have googled but found code for only for single post type or for single taxonomy.
0
votes
1answer
114 views

What does get_current_screen() do?

Codex says ' This function returns an object that includes the screen’s ID, base, post type, and taxonomy, among other data points' . What does it mean by 'screen'? Coding example: function ...
0
votes
1answer
333 views

Sort query output on taxonomy term archive by post type using pre_get_posts

I'm using pre_get_posts to adjust the main query of the taxonomy term archive. What I would like to accomplish is that the output is listed by post_type. I have a total of 4 post types and I want to ...
0
votes
1answer
302 views

Walker_Nav_Menu creating too many closing tags?

created this walker below to create a set of tabs. All looks ok but in the source there are several more than there should be causing validation errors. I only want to generate a tab for 'question' ...
0
votes
1answer
304 views

Pros and Cons of Post Types vs. Multiple Blogs

I currently have 3 WordPress instances. One is primarily a coding blog (with samples/tips, and a few personal insights). One is a photo blog. One is a general quote type blog, small snippets of text ...