Custom Post Types extend the WordPress back-end to support additional, non-Post content.

learn more… | top users | synonyms (1)

1
vote
1answer
187 views

How to prefix post permalinks with /blog/ - without affecting custom post types?

I have several custom post types, which are properly structured as /%post_type%/%postname%/, however I wish to have the same effect for regular blog entries: /blog/%postname%/ If I prepend the ...
1
vote
1answer
3k views

If on term-page -> get the current term?

I'm trying to write a kind of "breadcrumb" function in my "functions.php" I'd like to query if I'm on a term-page and if so I want to print the current term I'm in. By "term-page" I mean the ...
1
vote
1answer
526 views

How to Removing fields from the Media Uploader/Gallery on a Custom Post Type Edit Page

This post shows how to remove unwanted fields from the media uploader. It works great, but I want to limit it to a custom-post-type and I can't seem to figure out how to do it. I've tried the ...
1
vote
2answers
2k views

List all posts in Custom Post Type but group dynamically by Custom Taxonomies

I have a custom post type named "Resources" which has a Taxonomy named "Types." I have it manually pulling each term which isn't the most elegant solution and every time there is a new term added, I ...
1
vote
1answer
983 views

I can't set meta_key in my custom post type query

I've created a custom post, events, and saved the meta data event_year to each event. I'm trying to get a year's event archive. When I go the the following URL, the meta_key and meta_value are not ...
1
vote
1answer
1k views

Title_save_pre - Simple problem that u know for sure

I have two custom post type. Then I need to use title_save_pre to post title prior to saving it in the database. I need to use this filter just for one custom post type. This is my function: ...
0
votes
1answer
79 views

Compare 3 custom fields and sort by oldest

I am building a movie archive. For each movie I am filling out the release dates for 3 countries, they're stored as custom fields (added via Pods) Now, when listing the movies I would like to build ...
0
votes
1answer
57 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
1answer
65 views

How can I get some of a posts meta data whilst it is still inserting?

I'm trying to make a function where a child post of a certain post type inherits the same title and slug as its parent. I'm using WP Types to define my post types and their relationships. But I'm ...
0
votes
2answers
268 views

Custom wp_query pagination - next_posts_link() or wp_pagenavi() always empty

I'm aware this is a topic discussed to death, but I have read through many solutions and can't understand why my pagination simply isn't working. I have a very simple custom wp_query: $current_page ...
0
votes
1answer
43 views

Get custom taxonomies from multiple posts

I've been looking around for half a day now but no success so far. I've created a custom post type (recipe) and two custom taxonomies that go with it (type and cook). What I want is to be able to ...
0
votes
1answer
612 views

How to remove/hide elements from the admin menu?

I would like to hide Pages and Comments from the editor. I tried to override them with my custom types' menu_position but it doesn't work in WordPress 3.7.1 any more. I found another way: removing ...
0
votes
1answer
138 views

Custom Permalinks for Custom Post Types and Taxonomies

I've been struggling with this for hours. I'm trying to get this URL structure: example.com/business/%custom-tax-name%/%custom-post-name%/ By custom tax name I don't mean the name of the taxonomy ...
0
votes
1answer
281 views

Pagination problem in custom post type used as front page

I am working on a theme with custom post type. the issue currently is that i am saving the layout files in a folder called templates.. and in front-page.php i am using an options check to see which ...
0
votes
1answer
91 views

Determine which template-{slug}.php is being loaded

I am trying to make a personal plugin that does specific things based on what is loaded. In this example, in my action method I want to perform one function if the currently loading page is using the ...
0
votes
1answer
179 views

Order custom posts by taxonomy?

I have the following custom post types: books, documents, examples, guidebooks, onlineaids. They were generated by the following code: ...
0
votes
2answers
1k views

How to get the custom post type from an archive page?

In my website I have three custom post types: scripts, scenes and plugins. When visiting the archive page of a single post type (i.e. by going to mysite.com/plugins) you correctly see all the posts of ...
0
votes
3answers
544 views

Possible to add meta box to edit.php pages?

I've been googling this for a while, and came across this link here: Can I limit this meta box to a particular page? What I am trying to achieve is adding a custom Meta Boxe I created onto a CPT ...
0
votes
1answer
793 views

is_singular won't call my functions?

Hi i'm using this code to call for a different stylesheet for a single post type but the problem is, It won't call the stylesheet. It's in header.php, i also tried placing it in single.php <?php ...
0
votes
1answer
545 views

Refine custom posts by author

I want to have a way of displaying a custom post archive for a particular author. I'm able to display custom posts for a category but not just the custom posts for a author. I already have a separate ...
0
votes
1answer
402 views

Understanding Post Formats/Custom Post types Etc

I don't understand what "Adding Post Type Support" is for when we have "Adding Theme Support"? For different post-formats this is the way I was shown before. This is then how I did it for the project ...
0
votes
1answer
534 views

Multiple parameters in a custom post type url rewrite

I have a custom post type called venues currently they display through the url format: http://mywebsite.com/venue/{venue-name} I would like to have the format: ...
0
votes
3answers
766 views

How to select one major category (or custom taxonomy) for a custom post type?

I've created a hierarchical custom taxonomy (genre) and want to use it for a custom post type (radio station). But I don't only want to assign some genres to a radio station. I also want to be able to ...
0
votes
3answers
498 views

Custom Post Type Archive Template

I have similar problem to this one: Custom Post Type Template - Archive I have a WordPress custom post type called coupon. I try to assign the template to it by using archive-coupon.php, but it goes ...
0
votes
1answer
39 views

Creating additional page with own URL for each custom post

I have a specific issue here. I have website using custom post types, and I need to create a specific functionality for these custom post types. From each custom post type the user should be able to ...
0
votes
1answer
642 views

Multiple custom post types on index page with custom templates

I've got (currently) 3 custom post types that I need to display on my sites' home page using a custom query. Each custom post type has a different layout (1 post across, 2 posts across and 4 posts ...
0
votes
2answers
1k views

Wordpress 3.1 - Tag page not showing posts from custom post type

On the site I am developing I have a few custom post types set up (Press Releases, Articles, Podcasts). I also have the Tag Cloud widget enabled in my sidebar. I have tagged a post with 'Testtest', ...
0
votes
1answer
954 views

Pretty paged permalinks in custom post type loop

I must be annoying your with all these permalink questions :) The code I'm using for the loop is: // hijack stupid WP globals to get pagination working... global $wp_query; $temp = $wp_query; ...
-2
votes
2answers
247 views

Is there any way of not using my_init_method in the following code (that creates a custom post type)?

Mike Schindel provided me this code long time ago: <?php /** * Create the Blocks custom post type and the Sections custom taxonomy */ add_action('init', 'my_init_method'); if ...
5
votes
5answers
3k views

Change “Enter Title Here” help text on a custom post type

I have a custom post type created for a directory that will end up being sorted alphabetically. I will be sorting the posts in alphabetical order by title, so I want to make sure that the Title is ...
3
votes
5answers
5k views

Front end post editing using a form

I have a custom-post type with the standard meta boxes and some custom fields. How could I edit a post through a form in the frontend?
5
votes
1answer
2k views

Use a separate upload folder for custom post attachment upload

So, i'm trying to find out a way to use two separate upload folders, being the default one wp-content/uploads for general media uploads, and another one say wp-content/custom for one specific type of ...
2
votes
1answer
3k views

Custom post type metabox array

I am trying to create a custom post type with custom metabox array. How can I create this kind a automatic populating post type? I think I have to use two dimension array. But how can I automatically ...
11
votes
4answers
3k views

add_image_size() for specific Post Types

set_post_thumbnail_size( 80, 80, true ); // true for all post types Suppose I have two post types in play on my blog: Post, Video and Product. I may want a 80x80 image size for my posts, but 100x100 ...
7
votes
4answers
4k views

Showing User's Post Counts by Custom Post Type in the Admin's User List?

I'm trying to figure out how to hook into the /wp-admin/users.php manage page to create custom columns for showing the number of posts users have for the custom post types on WPHonors.com. I created ...
6
votes
2answers
7k views

Possible to hide Custom Post Type UI/Menu from specific User Roles?

What I'm looking to do is completely hide the UI for a custom post type from specific user roles...Ive previously found many resources on how to disable access to using those CPTs but nothing that ...
12
votes
3answers
3k views

What Is The Use Of map_meta_cap Filter?

What is the use of map_meta_cap filter? This filter is not documented anywhere. I have an unclear idea of what it could be: Used to map the permissions of the user to operations on posts. What ...
11
votes
6answers
6k views

How do I save metadata for a specific custom post type only?

I'm trying to set up a custom post type following this tutorial. However, I'm a bit confused as how/where to implement update_post_meta(). The tutorial suggests this pattern: add_action('save_post', ...
6
votes
5answers
7k views

Custom Post Type Archives by Year & Month?

How do you display the archives of a Custom Post Type by Year & Month?
5
votes
1answer
434 views

How to give a CPT (custom post type) a date based url

I have events that have an event-date custom field. I want to create a date based page to display all events for a given day, and my hope was to use the url to help with that. I have a 7 day ...
3
votes
1answer
3k views

Custom Taxonomy Template Post List with Sort Order

I have an interesting problem I am trying to solve. Here is my situations: I have create a custom post type for "events". For each event post I require custom fields to be entered for the event ...
2
votes
1answer
2k views

Loading Custom Post Type Events into jQuery-based FullCalendar?

Here is a question I have spent over 3 hours attempting to solve but each approach I take ends up not working out for me. All I am attempting to do is utilize this opensource ajax calendar script: ...
11
votes
2answers
6k views

Get custom post_type's archive URL

It seems like stupid question. But, I can't figure it out :(. I need to display button at home that goes to custom post_type's archive URL (archive-{post_type}.php). How do I do that?
5
votes
1answer
3k views

Custom post type, no need for single view, plus want permalink rewrites that include hash in URI

We are using CPT's to manage a frequently asked questions page on a site, where the question is the post title and the answer is the post content. There is a main page for the FAQs that shows all ...
5
votes
3answers
2k views

Add Custom Fields to Custom Post Type RSS

I'd like to add custom fields in my custom post type to the RSS feed for that post type located at http://example.com/feed/?post_type=my_custom_post_type I've seen info on doing this for the regular ...
3
votes
1answer
2k views

The right way to create a custom search page for complex custom post types

I am trying to create a custom search page to show only custom posts types that meet specific search criteria. I have a complex form that involves different selects, radio buttons and text input ...
3
votes
3answers
2k views

Forcing all posts associated with a custom post type to be private

Does anyone know of a way to add code to the functions.php file which will automatically force all posts belonging to a custom post type to be "private" and/or "password protected" with a default ...
2
votes
1answer
609 views

Post Via Email to a Custom Post Type

I have a scenario where we would like to post to our blog via email. However, it needs to be to a custom post type. I've done a bit of research but haven't found any examples or ideas on how to do ...
2
votes
2answers
1k views

Show certain terms from custom taxonomy but exclude 'parent' terms?

I have a custom post type "mycustom_products" (hierarchical) that has custom taxonomies called 'categories' and 'tags' (as many other custom post types do). My custom category is called ...
1
vote
2answers
1k views

Custom Post Type with Custom Title

I have a custom post type without title support and I'm trying to generate one from post's taxonomies and custom fields. To do so, I'm using this code: function custom_post_type_title_filter( $data , ...