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

learn more… | top users | synonyms (1)

0
votes
2answers
489 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 ...
0
votes
0answers
33 views

Bootstrap Carousel problems

I am attempting to use Bootstrap Carousel in my WordPress posts. I created a custom post type called "images" and made sure it's visible in posts, which is where I want to use the carousel. I uploaded ...
0
votes
1answer
335 views

Help integrating Custom post type meta field with custom profile fields

I have a custom post type for "locations" and I need to have "users" log in and be able to pick a location that is within a certain distance from them. I have added some spots to the profile using ...
0
votes
2answers
22 views

Using a Single Custom Post Type Template for Multiple CPTs

I'm working on a major WordPress site and ran into a problem where I need to use multiple custom post types, but I only want to use one template for all of them. I found a code by Brad Dalton of ...
1
vote
2answers
539 views

How to set up an entity (post-type?) with many dependent entities (more post-types?)

I want the wordpress CMS to manage a new type of content called Athletes. The data structure for Athlete would be as follows: Athlete.name Athlete.date_of_birth Athlete.profile etc... An athlete ...
0
votes
0answers
15 views

I cant get archive-gallery.php for custom post types

Hi to all I have just created a gallery with the codes below: //---------------------------------------------- //----------register and label gallery post type ...
0
votes
1answer
22 views

Create an Employee register [closed]

Not sure if this is the place for this question or not, but I'm sure someone on here can guide me. I'm looking for a plugin or Wordpress hack with custom post types to allow me to create an employee ...
0
votes
1answer
34 views

How can I list custom post type categories of portfolio

this code below lists wordpress categories and works <form action="<?php bloginfo('url'); ?>/" method="get"> <?php $select = wp_dropdown_categories('show_option_none=Select ...
0
votes
1answer
20 views

WordPress custom field images not getting inserted into array

I am using Wordpress to create a dynamic gallery using Bootstrap. I created a new custom field and then set it to 'images' and then assigned it to my post type. It then shows up in my post, I uploaded ...
3
votes
5answers
6k 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?
1
vote
1answer
493 views

Custom Post Types, URL rewrite on multiple CPTs

Re: Custom post types, taxonomies, and permalinks by @TheDeadMechanic The solution above works perfectly, and rewrite is great, but can you advise on how to rewrite for more than one custom post type ...
0
votes
2answers
778 views

Get image post ID in media upload

I am developing a plugin that adds a Custom Post Type to my theme. It's a retail directory and the post type is a retail listing. Everything is working fine. I can upload content to the DB and then ...
0
votes
1answer
30 views

Admin: Get all user for Custom Role

I made a custom post type evenement with these capabilities. Here, I just put the capabilities parameters. 'capability_type' => 'evenement', 'map_meta_cap' => true, 'capabilities' => array( ...
0
votes
1answer
154 views

How to show related posts by category or custom post type?

I'm looking for the best way to go about creating, probably, custom post type where you can filter in the categories related to that custom post type in the sidebar. Here is the website I'm working ...
0
votes
3answers
738 views

If Post Meta Equals Current Title Conditional Advanced Custom Fields

I would like to create a custom query loop to display data depending on the current post title. Pseudo-code: if post title = custom filed Show related content I have a page called artists ...
4
votes
2answers
17 views

How can i avoid the permalink start with 'blog' while using the custom post type?

I used the custom Structure /blog/%category%/%postname%/ for blog. also i have a custom post type named 'FAQ' while viewing the faq posts, it is showing the /blog/faq/%faq_category%/%postname%/. When ...
0
votes
1answer
441 views

wp_insert_post not working for custom post type?

For whatever reason wp_insert_post doesn't work for a custom post type. Here's the code snippet I'm using. $new_post = array( 'post_type' => 'rsp_synonym', 'post_title' => ...
-1
votes
0answers
5 views

Problem with attribute “compare” in wp advanced search [closed]

I'm using wp advanced search to create a search form on my site (for searching in custom post type whith custom fieds). http://wpadvancedsearch.com/docs/ But the form doesn't find all the results ...
0
votes
1answer
20 views

Enabling permalinks disables custom page template

I have assigned a custom template on a page in wordpress, but it's not working anymore after I enable permalinks. Instead of the custom template, the "post-type-archive-portfolio" template is used. ...
0
votes
0answers
20 views

Using custom fields globally?

I'm trying to use the value of one custom field on multiple pages and posts. I'm a newbie to PHP and custom fields so what I'm trying to accomplish could possible be done using a different method. I ...
0
votes
2answers
713 views

Add multiple custom meta boxes to different custom post types

I want to add one custom meta box to a specific custom meta type "chifres" and two custom meta boxes to a specific custom meta type "presse". This is how far I've gotten: Here is my code: //Add ...
0
votes
2answers
36 views

Custom taxonomy wp_query woes.

Here's a brief outline of the set-up: "The Art" CPT is where all the art and art descriptions are uploaded. In this CPT you can choose the category (custom taxonomy) of the art--painting, jewelry, ...
1
vote
3answers
2k views

Loading post content in FancyBox

I got a tricky question. I have created a custom post type whose posts I would like to display in a scrolling carousel. The carousel will only display the title, the excerpt and a "read more" button. ...
0
votes
1answer
740 views

Adding post_type to the query via pre_get_posts, with infinite scroll

I'm doing something wrong here. I'm trying to add a custom post type, external-videos, to the main blog query in all instances. It's working in the main blog page for the first load of posts but the ...
0
votes
2answers
30 views

Reworking function for counting custom post type posts count

I am trying to rebuild my inline posts counting to a function. What would be the best way to do that? Here is my inline code: $posts = ...
0
votes
1answer
399 views

WP_Query post at custom position

Lets say I have a custom query which based on two custom post types: $wp_query = new WP_Query(array( 'post_type' => array('post-type-1', 'post-type-2'), 'post_status' => ...
0
votes
0answers
37 views

Preview with Custom Post Type Not Working

At this point I have tried everything I know to fix the issue. Issue: preview only works right after a custom posts is loaded or updated. If you make any changes or hit preview twice without updating ...
0
votes
1answer
39 views

Capability to edit own post, but not create new one

i can't find anywhere how can i forbid to create new item, but allow editing of posts which was assigned to user. Lets say in my system there is admin who creates some posts, then assigns some ...
0
votes
0answers
22 views

How to e.preventDefault() on an admin post page for a submit() action?

Lately, I have had a problem with a seemeingly simple task of preventing a form submission an a post admin page in WP. In a nutshell: I created a meta box on an admin custom-post page that includes ...
2
votes
1answer
454 views

Set default custom post type for XML-RPC

So now that it is possible to work with Custom Post Types over XML-RPC, has anyone figured out a way to set the post type for all items coming in via XLM-RPC to a default post type? IFTTT has a ...
0
votes
1answer
921 views

Custom post type archive page pagination

I have set up an archive page for my custom post type reference, where I use a query to get all posts of type reference. This works, but when I try to paginate the result, it doesn't work. Right now, ...
0
votes
1answer
43 views

How to List CPTs Under One Tax Term

I am having some difficulties to get CPTs which are under one Tax Term. For Example if I have a Taxonomy Called "Movie" and Tax terms as: A B C How Can I list CPTS which are in Tax "Movie" and ...
0
votes
1answer
251 views

How to create a permalink for custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name

I found this link too much helpful. This is what I code so far and got it working for all scenarios except two scenarios. register_post_type( 'article', array( 'labels' => array( ...
1
vote
2answers
396 views

Unable to get wp_redirect() working after adding a CPT via the front end

I am attempting to learn PHP by creating a relatively simple application built on wordpress, it is a basic CRM and I've made decent progress but have been stuck on some of the finer points. I've been ...
0
votes
1answer
121 views

Associate Posts with individual user - hide from other members

Does WordPress have any functions which will help me create a system to have data ( eg custom posts ) associated with a particular user and (by default) not visible to any other user. I have had a ...
0
votes
0answers
12 views

Select value don't stay selected after save

I did a multiple select item that takes his options from another CPT, it works but after the saving the selected items don't stay selected. this is my code for the meta box global $post; echo ...
4
votes
1answer
567 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 ...
0
votes
3answers
42 views

Getting Twitter Content on My Blog

I'm the editor of a niche blog that posts lots of great content. We also post links to other sites/resources in our Twitter feed. What's frustrating to me is that outside content on our Twitter feed ...
0
votes
3answers
35 views

How to create custom post type like Page

I want to create a Custom Post Type like Post or Page, It should have Page templates Option. This is for multilingual site. Any comments on this ?
0
votes
1answer
23 views

Remove the “View” Link in Post edit Admin

add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 ); function remove_row_actions( $actions ) { if( get_post_type() == 'my_cpt' ) unset( $actions['view'] ); return $actions; ...
0
votes
0answers
11 views

Do not count menu items in posts_per_page

Custom type posts are added to query for category page: function test__pre_get_posts( $query ) { if( !is_home() ) { if( is_main_query() || is_category() ) { $query->set( 'post_type', ...
3
votes
2answers
59 views

Pushing a custom post type to the top of the search results

Apart from posts and pages there are profiles on my site. Does exist some way how could I push them to the top of the search results? Currently, results are ordered at first by keyword and then by ...
0
votes
1answer
266 views

Display posts order by custom post in a dropdown menu

In my WordPress backend I have some custom posts and, in one of them, I want to display in a dropdown field some posts related with but ordered by post type. Iwant to display something like this. ...
0
votes
1answer
39 views

Howto: use existing post_meta as options for a different metabox (checkboxes or list)

I want to create an "Employee" Custom Post Type ("Add New Employee") wherein the employee may belong to one or many offices. The user needs to be able to add/edit/delete offices via a separate ...
7
votes
1answer
1k views

Remove the “View” Link in Post Admin

I have a custom post type that I'm just using just to keep data in but I sometimes share it with others, and I don't want any confusion when the "view" link appears in the admin column. Is there a ...
-1
votes
2answers
3k views

Woocommerce product page is not showing custom css [closed]

I am using woocommerce plugin for wordpress to make an eCommerce website. It is working fine with little bit customization. As I have configured shop page as the default product page so that in that ...
0
votes
1answer
23 views

Custom Post Type not visible on category page

I would like to use the default category for my custom post type, but when I open the category page there's no posts there. The loop is very simple: <?php if ( have_posts() ) : while ( ...
0
votes
0answers
9 views

How do I add a custom button to my “edit” list? ( edit.php?post_type= ) beside “Add New”

I have a custom post type for a plugin I'm creating and the label for the "add an item" type of button (at the top of the list page) needs a partner-button that says "import" and one that says ...
0
votes
0answers
6 views

Creating custom rewrite rules for site sections

I have a WordPress site with several custom post types. I would like to group them by a URL prefix. Maybe something like this: www.example.com/ prefix_one/ post_type_one/ ...
0
votes
2answers
316 views

Multiple tag cloud filtering

I am writing a plugin which creates a custom post type and two associated custom taxonomies. The custom post type list/archive page should be filterable by terms in one or both taxonomies i.e not just ...