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

learn more… | top users | synonyms (1)

1
vote
1answer
162 views

How to use the Display Name as the post title in a custom post type?

I've created a custom post type called "teacher" and I want to use that person's display name as the title of their post. Details: 1. The "teacher" custom post type supports title. 2. Only logged in ...
-2
votes
2answers
90 views

How to set up a echo? [closed]

My problem is that i don't know how to set up a echo I think. I need it to just wrap a if statement correctly around the code below Please Help...Thanks SO much <?php global $post; ...
1
vote
1answer
340 views

Custom Post Types relationships

I have a custom post type for my videos. I need do related it with other post category. And i have 10 category Like this : Post Category - Video Category Tech Tech Marketing ...
1
vote
2answers
142 views

List upcoming events, ordered by date in a custom field

I want to display a list of events with dates in upcoming order. Ex: 23 March, 2013, 30 March, 2013 Below is the query I'm using to filter out posts from my database: query_posts( ...
1
vote
0answers
108 views

CPT Parent as a page and CPT Child as a posts

I have one CPT page named as books and one CPT post named as chapters, I am trying to achive this permalink structure here book1->chapter11 book1->chapter12 book2->chapter21 ...
0
votes
1answer
49 views

Designing a custom post type with a minimum number of meta fields

I am new to PHP, mySQL and scripting in general. I'm trying to design a WP custom post type which would be like a point on a timeline or an item on a resume. I'm having trouble designing the structure ...
1
vote
1answer
427 views

register_post_type sort order by title by default

If I add a custom post type (example code below), in the admin page for the new custom post type the posts are sorted by ID by default. Is there a way to set the default sort order to the post title ...
0
votes
1answer
137 views

Canonicalization + Custom Post Types not working as expected

I have an issue with Canonicalization where on Custom Post Types say for example: /custom-post-type/{post_id}/fake-post-name/ is loading up but not redirecting to : ...
1
vote
1answer
1k views

disable permalink on custom post type

I have created a custom post type, but I do not want it to have a permalink. By default, after entering post title, it creates a perma link. I do not them to be generated. From my reading, it is said ...
2
votes
1answer
2k views

Creating a custom public user page

I'd like to develop a plugin that allows me to have custom user pages. I really like the way the author archive template handles the URL: /author/username. I don't want to rewrite the author_base as ...
0
votes
1answer
60 views

Hooking in to an archive page?

I'm making a custom post type that I want to use in the form of a plugin - all pretty straight forward. However, I want the archive page for this post type to look slightly different in the content ...
2
votes
1answer
1k views

Adding Sticky functionality to Custom Post Type Archives

In WordPress, Custom Post Types do not have Sticky functionality as a core feature. It is possible, I'm sure, to create it in certain cases—and I'm working on a project that requires it for ...
0
votes
2answers
175 views

Problem with custom post type search

I built a custom search with the following code: functions.php function template_chooser($template) { global $wp_query; $post_type = get_query_var('post_type'); if( ...
0
votes
1answer
289 views

Using shortcodes to parse POST request (containing the data from a front-end form)

I would like to allow my subscribers to post classifieds, which are nothing but a custom post type with a few metas for the price, etc. (The existing classifieds plugins I have tried are way too ...
1
vote
2answers
71 views

apply filters only to specific post listing without check the url parameters

I have made a custom post type named as: slider, in my plugin class, I am adding a filter which calls the method remove_row_action that unsets view links from actions ...
0
votes
1answer
21 views

Why is my taxonomy have a category style div id?

I created two custom taxonomies. I created them using identical code and then finding and replacing the "name" with "name2". I've then looked at the post type page and there are two tag boxes to ...
0
votes
2answers
166 views

wordpress remove views from action links in a custom post

I have created a custom post type, but I want to remove the View link from actions, in the listing of the custom post. I have tried this snippet add_filter( 'post_row_actions',array(&$this, ...
0
votes
1answer
50 views

Allow certain part of a page to be easily updated for client?

My client has asked me to create an about me section which will include a picture, job title and description for each team member as floated elements. They also want it to be as easily updateable as ...
1
vote
2answers
597 views

How to remove slug metabox from custom post type's page?

I just discovered a new meta field on the newly created custom post type page. The meta name is slug, and it's under the wp editor field. What's that, and how can I remove it?
1
vote
2answers
761 views

Wp_query: sort by PHP variable

Here is my problem: For my articles, I use a custom post type "exhibitions" and posts for all other news. I am displaying them in one query ['post_type' = array('exhibitions','posts')]. The orderby ...
3
votes
1answer
785 views

Formatting custom meta box date from YYYY/MM/DD to a more readable alternative

QUESTION This is following a previous question that was graciously answered by Milo earlier here - How to sort CPT by custom meta value (date), and return posts month by month In short, I'm having ...
0
votes
1answer
421 views

Thumbnails Not Generating

Ok, So this is a weird issue...WordPress doesn't generate thumbnails, I have my image sizes set and everything...I'm pretty sure it's related to my custom posts type code (see below) because when I ...
0
votes
1answer
185 views

Custom role, capabilities, and post type: preview button wrecks things

I'm using the Members plugin to manage capabilities of a custom role that will only be able to edit/publish a custom post type that I created in my functions.php file. After much work, I got this ...
0
votes
1answer
469 views

Permalinks for single-[custom-post-types] not working

I've been reading a lot about my simple issue, but wasn't able to find the simple answer, so, please excuse my noobieness. I have a custom post type registered in functions.php, like so: <?php ...
0
votes
2answers
58 views

Most efficient way of deleting post

I have a cron job set to remove a (sometimes large) number of posts from my database. Of course, I also need to remove all associated data such as custom fields. This is the function I'm currently ...
0
votes
1answer
85 views

Add a class to post_class if more than one post shares same meta_value_num

I would like to be able to add a class such as .samedate to posts that share the same meta_value_num from a custom meta box. So for example: Say two posts share the same custom meta box value for a ...
0
votes
1answer
721 views

Loop through Custom Post Type, and then show children within each iteration

I am currently using WP_Query to loop through a custom post type, and only showing the parent posts like so: <?php $loop = new WP_Query( array( 'post_type' => 'programs', ...
0
votes
1answer
38 views

categories of custom post type shows in CMS but not in the frontend webpage

I have created a custom post type "Events" and added the categories function for it. However, the categories only shows in the backend CMS which I can set and add new categories, but no message ...
0
votes
1answer
194 views

wp_query and comment_parent - select only posts with top level comments

I have a custom post type of 'films', and I'm creating a number of search filters using wp_query. All are working fine, but I now need to add in an option of exclude results that dont have any top ...
0
votes
1answer
84 views

Sorting posts by custom field value in array

I have a custom field value that is an array and it has date as one of the values: a:3:{s:4:"date";s:10:"03/06/2013";s:6:"target";d:1000;s:8:"currency";s:3:"USD";} I'm trying to sort posts with ...
0
votes
1answer
39 views

Problem with menu categories doubling up when updating database?

I imported a database from a website to my localhost and the menu categories started doubling up. The wordpress dashboard is also missing my custom post types. How can I solve this?
4
votes
1answer
159 views

Numbering sections and block-level elements in wpautop(); Wordpress as CMS for long-form writing;

I am starting to learn how to write plugins for Wordpress. I'm interested in using WP as a CMS for long essays (6000-9000 words or more). My problem is what I call the Kindle problem, which is how do ...
0
votes
1answer
31 views

Custom Portfolio String

I have a field on my portfolio admin page which shows the url when the user write a url(obviosly). I want to when the user write in the field, elements appear along with it. And if the field is empty ...
0
votes
1answer
39 views

Noob Loop Question

I come with a basic question but I can not solve, I think that will be easy for you. I would like, if I have 2 or more post on loop, show the entire loop. I tried the following: <?php $paged = ...
0
votes
1answer
79 views

How can I make my custom posts appear in their assigned category url?

I am trying to solve this problem: I created new custom post types. When I create a post and assign a category (lets say category-1) to it, and when I try to visit the category-1 url, it appears ...
0
votes
1answer
395 views

Display custom post counts for author , not default posts

<?php global $wp_query; $curauth = $wp_query->get_queried_object(); $post_count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '" . $curauth->ID . ...
4
votes
2answers
11k views

How to create a custom search for custom post type?

I have a search field for the blog posts, but I need an other for a custom post type. How can I create this custom search form with a different search result layout?
0
votes
2answers
662 views

Most viewed post of custom post type

Im using following code for getting most populer post with thumbnail.I have a custom post type taxonomy (Talks). Custom post types(video) have 6 category. But my code not working. It just getting 1 ...
0
votes
1answer
76 views

Creating shortcodes with user created forms

I am creating a plugin. That enables users to create forms, & display these with shortcodes on a site. When creating a form (using custom post types), users will be able to add additional form ...
2
votes
1answer
127 views

How to add plugin custom field to custom post type?

I have used a plugin called Amazon product in a post. It works okay with posts type. It adds custom fields in the posts page. But, I have made another custom post type called products. It does not ...
1
vote
1answer
552 views

Removing parent slug in hierachial custom post type

I need to remove the parent slug in the permalink of a child post. The child post is of a different cpt than the parent post. So I get: example.com/parentcpt/parent-post-name/child-post-name //which ...
0
votes
2answers
193 views

Top Contributors Plugin with Custom Post Type

I am using the plugin Top Contributors. That's very helpful for all blogs. But the problem with this plugin is: it is not integrated with custom post types. How could I extend the plugin to do that? ...
0
votes
1answer
513 views

Query custom posts from custom taxonomy

I'm trying to do a custo slideshow, but I have problems with query the posts. I have defined a custom post type "slider" and a custom taxonomy "slideshow": custom post type: function ...
1
vote
2answers
389 views

Mapping Subdomains in Wordpress to give the appearance of a localised site, best approach?

I am building a classifieds website and am using Wordpress for the functionality of user accounts, Paypal integration, custom taxonomies and of course super flexible custom post types for the ...
0
votes
1answer
55 views

How can I add in post's the text “No content”

How can I add in a post the words "No content available" if nothing is ritten Example: If there is no text added, i want to get "No content available" automated in my template. I want to get for a ...
0
votes
1answer
137 views

Loading one meta box only on post-new.php with a forward link

I need to load a meta box for editors to choose the parent post first before editing. But dont see the wide meta box i expect and the normal edit page just loads: This is the code at the begining of ...
0
votes
1answer
125 views

Categories and page filtering with pre_get_posts

I have 3 pages, "Page 1" shows custom post-type "articles", "Page 2" shows custom post-type "tips", and "Page 3" shows both custom post-types. This is done conditionally with a custom loop in ...
0
votes
1answer
307 views

Custom My account page and custom page for editing posts

I have created WP theme for property company, with custom post types which are actually apartments so users can from one custom page enter all the informations and the custom post gets saved. I ...
0
votes
3answers
527 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
2answers
428 views

How to enable parent-child relationships and post attribute admin widget for posts

I want to be able to select a parent post when i create a new post. I assume it should be easy just to make the 'page attributes' admin widget to work similarly for posts too. The use case is for ...