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

learn more… | top users | synonyms (1)

0
votes
1answer
141 views

taxonomy terms array not working

I'm working on a solution to filter a custom post type by multiple terms in multiple taxonomies. Here is my code: <?php $term = "peoria,adams"; ?> <div id="primary" ...
1
vote
1answer
532 views

Query for custom post type objects in a taxonomy and with a meta value

I want fetch all posts from the post type book in the custom taxonomy book_tags with the meta key lang and the meta value en. My code: <?php $args = array( 'post_type' => 'book', ...
0
votes
1answer
709 views

$wpdb->get_col and ORDER BY?

this is the query that returns the listing of a custom post type $apartments = $wpdb->get_col( " SELECT DISTINCT( post_id ) FROM $wpdb->postmeta ...
1
vote
2answers
5k views

Enable sticky posts to custom post_type

i have this custom post_type: tvr_apartment function custom_post_apartment() { $labels = array( 'name' => 'Apartments', 'singular_name' => ...
0
votes
1answer
1k views

Buddypress: Display multiple custom post types on member's profile

GOAL We have several plugins in Buddypress to display posts in member's profile page (posts of displayed user), some of them doesn't work anymore (bp-posts-on-profile) or new one (TCH_PostsOnProfile) ...
0
votes
1answer
704 views

Multiple Archive Pages for Custom Post Types AND Taxonomies

This is both a "how do I?" and "how should I?" question, as I'm thinking of ways to achieve my goal but they seem rather messy, so I'm hoping there's a neater way. Currently I have a custom post ...
0
votes
1answer
35 views

Remove custom post type in url?

I created a custom post type Track and I want the posts url to be exactly like a normal post url. Now it adds an extra "track" in the url ex: www.site.com/track/title. I want www.site.com/title. How ...
-1
votes
1answer
161 views

How to get 'Products' on home page?

I am using query post in loop.php query_posts( array('post_type'=>array('product','post'),'paged'=>$paged ) ); So that the custom post 'product' (woocommerce product) can be displayed on home ...
1
vote
1answer
3k views

using $wpdb to get custom post type with term

I'm trying to get the title of the first custom post type with a specific term in a taxonomy. But I'm not great at SQL so therefor not great with using $wpdb. Here is my code: $posts = ...
0
votes
1answer
144 views

What is the proper way implement a global $wp_rewrite?

The below code works correctly, but I don't know if it is proper coding. Can anyone confirm or comment on the code? add_action('init', 'news_rewrite'); function news_rewrite() { global ...
0
votes
2answers
126 views

Is it possible to remove the word “date” from archives?

I can't figure out how to remove the word "date from the permalink for yearly archives. For example: [http://localhost/wordpress/news/date/2012] On single news pages the permalink looks like this: ...
1
vote
1answer
142 views

Invalid argument supplied in register_taxonomy $args->taxonomies

I have capabilities assigned in my register_post_type(). Then, I implemented taxonomies on my plugin. Where the $args in taxonomy are as follows: $args = array( 'label'=>'Partner Type', ...
0
votes
1answer
808 views

Create a custom taxonomy template that loops through child categories in term order?

We're building a site that sells Biking Gear We're using the Genesis Theme Framework, and developing a custom child theme. It has a Custom Post Type for Products, made with the "Custom Post Type UI ...
1
vote
3answers
5k views

wp_insert_post() or similar for custom post type

Need to insert custom post type objects from code. Haven't been able to add using the default method $id = wp_insert_post(array('post_title'=>'random', 'post_type'=>'custom_post')); creates a ...
0
votes
1answer
159 views

How to display only taxonomies of custom post type in a page?

I have created recipe as a custom post and types as a taxonomy. In that taxonomy I have created vegetables and fruits as fields and I have 5 posts in each fields, but I need to display only vegetables ...
0
votes
1answer
134 views

List a custom post type's posts ordered by nested custom taxonomy

Like the title says I have custom post types and custom taxonomy for that type. For the Taxonomy I have terms in 3 levels like this: -> Term 1 --> Term 1a --> Term 1b -> Term 2 --> Term 2a --> Term ...
0
votes
0answers
116 views

Displaying or Hiding Metadata on Page from WP CPanel

I have a custom post type called "Celeb". This CPT contains two Taxonomy terms as "Men" and "Women".Each Post has two metadata as "Name" and "Age". Now I would Like to add a "Visibility" checkbox ...
0
votes
2answers
32 views

Sorting custom post types by taxonomy (So close)

I have a custom post type called 'requests' that has a custom taxonomy 'request-categories'. I've created a template with a modified loop that allows me to view my custom post type in a certain ...
0
votes
0answers
96 views

Imported custom post type are not editable

I've just imported content into my wordpress (3.5.2) database and I have a number of custom post types. My problem is that I cannot admin any of the custom post type content that I have just imported ...
0
votes
1answer
2k views

Add Metabox to all custom post types

Ok, I've looked through the forum here, but haven't found quite what I'm looking for. I wanted to see if it was possible to add a Metabox to all custom post types without the need to setup an array? ...
1
vote
0answers
283 views

Changing a custom post type “has_archive” after registered

Ok, I've seen some similar posts on how to change a custom post type's attributes after it has been registered (in my case, I'm trying to modify a custom post type created by a plugin without ...
1
vote
1answer
370 views

Call custom post type by category

Ok, I used Custom Post Types Ui to create several custom post types. When setting up the CPT's I checked off that categories were enabled, and then I added a few categories to one of the CPT's. Now ...
0
votes
1answer
32 views

listing custom post type category page

I've registered custom post type "deals" and its taxonomy "deals-category" the page site/deals/ runs the archive-deals.php fine but in page site/deals-category/travel/ runs the archive.php file! How ...
0
votes
1answer
81 views

Adapting plugin for custom post type?

I am trying to reformulate a function (in a plugin) so that it applies to posts in a custom post type rather than normal posts. function saving_posts($post_id) { global $wpdb, $user_ID; ...
1
vote
1answer
371 views

RW Meta Box ,Problem setting post title

I'm using RW_Meta_Box plugin by Rilwis. I'm using a CPT and added a custom meta-box and removed the title and editor. But I still want to set the title for some obvious reasons. I created the CPT ...
0
votes
1answer
308 views

Custom Posts and Posts - next_post_link and previous_post_link not working together

I have regular posts and one custom post type ('SS13') pulled in together on the same page. When you click through to the 'single' page for each the next_post_link and previous_post link only work ...
2
votes
1answer
216 views

Parent page for CPT

Alright, there's been numerous topics about this, but it doesn't seem to work for me. I have one normal page, called "Resources". Then I have several Custom Post Types. One of wich is "Video's". I ...
1
vote
0answers
120 views

Hierarchical custom fields

I need to display press statements as a custom post type ("statement"). Associated with each statement post type is one or more Authors, which is currently implemented also as a custom post type ...
2
votes
2answers
72 views

Display different custom post type each week

I have a project where I need to display an alternating food menu each week. i.e. menu1 on week1, menu2 on week2 then back to week1 etc. I've created custom post types for each menu (menu1 & ...
0
votes
1answer
77 views

Control Loop Within Loop

I am attempting to control a loop I have within a loop. What I would like to do is display all post and have a custom post type inserted every 3 post. So it would be like this "post post post CPT post ...
2
votes
1answer
1k views

Get post type from taxonomy or category page

This might be somewhat backward, but how can one get the post type being displayed on an archive page? Alternatively, how can one get the post type associated with a given taxonomy?
0
votes
2answers
151 views

Custom Post type plugin breaking the front page shows dashboard?

I am following the wp.tutsplus tutorial on Custom post types. Everything was fine until i added this code in my main plugin file <?php add_filter( 'template_include', 'include_template_function', ...
0
votes
1answer
78 views

Inserting random posts

I'm wanting to add 2 custom post types to a slider, one is Events the other is Core Values but I am wanting to add all events and randomly insert only 2 or 3 of the 7 core values. I have this query ...
0
votes
1answer
889 views

custom post type: own database table structure and custom “new-post” interface

I was tried to search answer to my question, but I didn't find. What I need: Make own post type. It's simple with Custom Post Type UI plugin. Solved. To have own table in DB for post of new type. ...
2
votes
1answer
1k views

Count posts or custom post types from last 24 hours (or from today)

I would like to display count for custom post types (or posts) which was published that day (last 24 hours or TODAY). I use this snippet to get count of all posts from "posts" or from "custom post ...
0
votes
1answer
176 views

Nested loop called with shortcode duplicating the content above the main loop

I'm trying to use a shortcode to call one post from a custom post type and display it inside another page's content. (Basically, we have a custom post type called 'testimonials' and we want to display ...
1
vote
1answer
6k views

Creating a Custom Post Types dropdown in a Meta Box

Is it possible to populate a meta box with a drop down list of custom post types? I plan on trying to create a template for a client that will allow them to create a new page in the dashboard, and ...
0
votes
1answer
158 views

Limit to add one post per category only

What is the best way to implement a site that has one post per category only? The structure of the site is that it has an "About", "Services", "Bio" etc. Per custom post types or per categories?
0
votes
2answers
58 views

What method should I use for a sidebar widget that reads latest posts?

At the moment, I'm building a website for a local NGO and I have the following situation: in the sidebar, I should have a widget that displays the title of the latest editorials from the members of ...
0
votes
2answers
395 views

Pagination for event query

I'm working on a WP_Query using the Modern Tribe Events Calendar My problem is with pagination. Is this the incorrect way to paginate the WP_Query or could there be another method for paginating the ...
0
votes
1answer
31 views

How would I get a list of posts from a custom post type

I know the query method that you would use, that's not what I want. I could query the post type, then do the if statement with the while statement and go from there, but I am trying to populate a drop ...
0
votes
0answers
686 views

Sorting custom post types by category?

I'm working on an exchange site of sorts where people will be able to list or request surplus items inside of our organization. Listings will just be submitted as 'posts' but I've created a custom ...
0
votes
2answers
1k views

Using pre_get_posts to filter one loop in a multiloop archive

I have a custom-post-type archive (archive-rg_blog.php) with two loops in it. One of the loops I'd like to filter with the below code. It's just a basic loop for all posts, and I just need to set it ...
1
vote
1answer
569 views

2 Different Custom Post Types in Submenu

i have register 2 custom post types within my plugin one of them is shown in the left admin bar, the second i wouldn't show so i have set the "show_ui" to false. Is it possible to add the second post ...
1
vote
1answer
515 views

Pagination on with query_posts in custom post type template

I know there about a thousand pagination issue questions on here, and I've looked at them, but I can't seem to figure out what's going wrong with mine. This is a loop on a custom post type archive ...
0
votes
2answers
505 views

display posts from category within a custom taxonomy

I am trying to listing posts from a single category of my custom taxonomy. I have created a custom post type called "news" and a custom taxonomy called "instituteName". I then created a number of ...
0
votes
1answer
1k views

Add number in increment of one to DIV ID

I'm using a shortcode to display a custom post type. The shortcode contains an attribute to display only posts of a specific category within the custom post type e.g. [faq category="travel"] For each ...
0
votes
1answer
45 views

Publish and save specific postmeta to a filtered post_type

I have multiple plugins with different post_type(s). When I save or publish, all of the custom_post_meta that belong to one specific post_type are also saving. I'd like to filter by post_type so ...
1
vote
2answers
1k views

Add category attribute to custom shortcode

I have created a custom post type called "faq". The custom post type uses categories. I have created a shortcode [faq] that displays all the faq posts. What I would like to do is add an attribute to ...
0
votes
1answer
198 views

Make title field multiline in the add new custom post page?

I have a custom post type named "news". The title field holds the raw news and i added another custom field that holds the published news. The published news field is a text area so i can use enter ...