Questions tagged [custom-post-type]

A Custom type of content to the Open Source CMS System WordPress.

WordPress can hold and display many different types of content. Internally, these are all stored in the same place, in the wp_posts table.

for extended review please visit here

For registering custom post type visit here.

3045 questions
20
votes
3 answers

How can I display a list of WordPress custom posts?

I am using WordPress 3, and I created a custom post type called article, which gives me the URL format of mywebsite/articles/article-title. How do I see all the article entries in the URL mywebsite/articles?
Giljed Jowes
  • 689
  • 3
  • 9
  • 17
20
votes
5 answers

How to order by multiple meta keys?

I’m using a custom loop to display my events on a page, I get it fine ordering by the event start date using the below: $args = array( 'post_type' => 'event', 'order' => 'ASC', 'orderby' => 'meta_value', 'meta_key' =>…
user1280853
  • 1,019
  • 5
  • 14
  • 23
19
votes
2 answers

Adding a jQuery script to wordpress Admin

I cannot for some reason get the wordpress /wp-admin pages to execute a simple query file. It only works if i deregister jquery in my functions.php within my theme folder, but then i must re-register all the jquery.ui files separately which is…
drav
  • 409
  • 1
  • 4
  • 14
19
votes
11 answers

Wordpress Custom Post Types doesn't show in admin left sidebar menu

I have a weird problem with one of my custom post type that doesn't show in left sidebar admin menu. I declared 5 custom post types but the fifth doesn't show in left menu. Here it's the Clients post type that doesn't show. I made a lot of search…
user2475614
  • 191
  • 1
  • 1
  • 5
16
votes
3 answers

Gathering Custom post types via tags

I have set up my custom post type called 'sectors', using the code below: register_post_type( 'sectors', array( 'labels' => array( 'name' => __( 'Sectors' ), 'singular_name' => __( 'sectors' ), …
user2209033
15
votes
2 answers

What action can I use in WordPress that triggers whenever a custom post is saved or updated?

Any way to have save_post for custom posts only? The way my functions.php is coded is tacking on lots of custom fields to normal posts and pages who don't need/use them.
Kyle Hotchkiss
  • 9,348
  • 18
  • 51
  • 81
15
votes
3 answers

Have a WordPress page with same title as custom post type “front” slug

I have a custom post type djs and a custom taxonomy city with two terms: boston and nyc. So a DJ can either be tagged as Boston or NYC. DJ profiles (a single djs post) are located at /nyc-wedding-dj/joe-shmoe/, for example, or for a Boston DJ,…
HandiworkNYC.com
  • 10,184
  • 23
  • 85
  • 145
15
votes
3 answers

Get_the_terms - display all post types

The question has been updated. See below for latest version I am having troubles to see all post types when using custom posts. This is based on isotope, and the user is supposed to click on the links to see posts within that category. All posts…
Olen
  • 1,143
  • 2
  • 9
  • 33
15
votes
1 answer

Wordpress Custom Permalink for Just Posts

My Wordpress install has three post types: pages, posts, and portfolio. The current structure is as follows: page: example.com/page-name, post listing page: example.com/blog, individual post: example.com/post-name, portfolio listing page:…
frogg3862
  • 453
  • 1
  • 4
  • 18
15
votes
7 answers

Wordpress - Featured Image Meta Box not showing on custom post type

I just created a custom post type, but for some reason the Featured Image meta box isn't showing up. It does show on the "posts" post type though. I have enabled theme support for thumbnails and have added the following code in my custom post type…
Ashley Staggs
  • 1,495
  • 9
  • 23
  • 38
14
votes
2 answers

WordPress: Capabilities for custom post types

I'm writing a plugin which creates a custom post_type. I'd also like the plugin to create a custom role which can only add/edit/delete the new post_type. I've tried several plugins (Role Scoper, Advanced Access manager) and they allow me to redefine…
emersonthis
  • 30,934
  • 52
  • 191
  • 328
13
votes
2 answers

How to fetch all WordPress posts with featured image?

In WordPress 3 there is Featured Image functionality. How do i fetch all posts that have a featured image with them? Here is my current custom loop: $loop = new WP_Query( array( 'posts_per_page' => 15 ) );
Giljed Jowes
  • 689
  • 3
  • 9
  • 17
13
votes
4 answers

WPML and custom post types archive template

I am using WPML 3.0.2-a with WordPress 3.8.1 I have a custom post type defined like this: function add_custom_posts(){ $args = array( 'labels' => array( 'name' => __( 'Showcases' ), …
12
votes
4 answers

How to get the taxonomy values of a custom post type

I am creating a new template that will get all the custom post type (Case Studies) content, including the taxonomies values associated with it. So far I got the following:

user2091936
  • 516
  • 1
  • 6
  • 26
12
votes
1 answer

WP_Query - multiple custom post types and sort by custom meta

I'd like get results from two custom post types and sort them by custom meta (date of start events). This code: $warsztaty_q = new WP_Query(array( 'post_type' => array('kalendarium', 'warsztaty'), 'order_by' => 'meta_value', 'meta_key'…
martin_682
  • 123
  • 1
  • 1
  • 5
1
2 3
99 100