The tag has no wiki summary.

learn more… | top users | synonyms

5
votes
3answers
1k 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
108 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
745 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
1answer
65 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
724 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' ...
3
votes
1answer
455 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 ...
3
votes
1answer
361 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 ...
2
votes
3answers
4k 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
2answers
180 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
129 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 ...
1
vote
1answer
1k 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 ...
1
vote
1answer
253 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
40 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
1k 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
975 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
497 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
260 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
38 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
135 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
132 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
1k 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
0answers
54 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
108 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
123 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
362 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
94 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
274 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
44 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
49 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
149 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
2answers
2k 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!
0
votes
1answer
63 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
454 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
72 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
227 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
239 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
267 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 ...
0
votes
1answer
330 views

Show multiple tax_query from 2 or more post_type in a single code

i've been trying with no success to show 2 custom taxonomies from 2 post_type, here's my code: <?php /** * Display a list of the most recent news in 'Avisos' ...
0
votes
2answers
676 views

“Revision” records in wp_posts have original post type instead of “revision”

After seeing some weird hits in my Relevanssi search results I found the following: http://wordpress.org/support/topic/searching-with-relevanssi-shows-all-revisions I ran the following on my ...
0
votes
1answer
350 views

Why would post_type be ignored in this query?

In the following query, post_type seems to get ignored resulting in display of all posts from my installation. What have I done wrong? <?php function filter_where( $where = '' ) { $where .= " ...
0
votes
1answer
2k views

query_posts doesnt show pages with given ID when post_type => page

At the moment I am working on a WP-site, which on the frontpages has 3 excerpts of other pages on it. The code I am trying to use for this is as following: <?php query_posts(array('post_type' ...
0
votes
1answer
1k views

Why does 'exclude_from_search' exclude a custom post type from WP_Query?

In WP 3.1, it appears that setting 'exclude_from_search' = TRUE for a custom post type excludes the post type not just from searches on the front-end, but also from any post query using 'post_type' = ...
0
votes
1answer
465 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
2k views

Dynamically Set Wordpress Post Title To The Category Name

I have a few custom post types set up. However, a couple of them have the title field removed from the edit screen because a title does not make sense in some aspects. However, I now find that all ...
0
votes
0answers
25 views

How to remove slug from more than one custom post type

I followed this tutorial from WordPress (http://vip.wordpress.com/documentation/remove-the-slug-from-your-custom-post-type-permalinks/) to remove slug from custom post type. Now my question is how to ...
0
votes
1answer
46 views

wp_query for displaying attachments with a tag

So I am running the following query: <?php $args = new WP_Query(array( 'post_type' => 'attachment', 'posts_per_page' => -1, 'oderby' => 'title', ...
0
votes
0answers
36 views

how to force CUSTOM POST TYPES to use default permalink

my custom post type sample link is : mysite.com/custom-type-name/post_slug i want that my custom post types used the permalink structure, which i have set in Options>Permalinks (exactly, i want ...
0
votes
0answers
37 views

How to show metabox key to custom post?

is it possible to show all custom metabox key name and show it as dropdown list on my custom post with my custom metabox dropwdown list ? this is custom metabox from another plugin/theme and how ...
0
votes
2answers
165 views

Overwrite rewrite-slug of built in post-type 'post'

I need to change the rewrite-slug of the built in post-type 'post' to 'example.com/magazine/news/any-nice-news-item'. When I re-register the post-type 'post' and set the rewrite-slug to ...
0
votes
1answer
96 views

Taxonomy Category category.php not working

I have created custom post type, taxonomy and categorys. When viewing the category it seems to be using index.php and ignoring the WordPress template hierarchy. Any ideas why category.php, ...