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

learn more… | top users | synonyms (1)

0
votes
1answer
2k views

Use menus with anchors

I have a CPT archive page and I want to create a navigation menu which will jump to anchors in the form <a name="post-slug" http="{the permalink goes here}>The CPT Title</a> I have been ...
0
votes
0answers
93 views

How to clone a post through frontend?

I need for my cliente to have the ability of clone/duplicate a custom post through the frontend? Are there any plugins or hooks/functions that I could use? I'm using ACF frontend forms to add the ...
0
votes
1answer
673 views

add category name to permalinks on product page /category-name/product-name

I'm trying to reconfigure the permalinks used in WooCommerce such that the following format will be displayed: homesite/category/product. Right now, the permalinks only shows under a category page: ...
0
votes
2answers
674 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 ...
0
votes
1answer
26 views

Tricky Custom post loop

I'm building a site using "theretailer" as a base and I cant figure out where to place code to get the loop to work for a custom post type "News"? the loop the theme uses is ...
0
votes
1answer
770 views

How to query posts by meta keys AND under specific category?

The scenary: I'm working in a review system for WordPress, a game review website. It uses default posts, that when under "review" category, shows the review's meta fields (from ACF plugin). It's ...
0
votes
1answer
620 views

Change permalinks for custom post type based on taxonomy term

I have a custom post type 'profile'. Each profile can be one and only one of either student, staff or alumni, which is set through the 'profile_types' custom taxonomy. This gives me permalinks of: ...
1
vote
2answers
594 views

Excluding post type from WordPress link builder

I have created a custom post type with parameter 'public' set to true. This is because I have to have it accessible in plugins that help you to build queries for post display, such as the Views (part ...
0
votes
1answer
29 views

How to get only child terms from a custom taxonomy of current post type?

Having a custom post type 'pubs' with custom taxonomy 'types' in which admin enter parent terms and their child terms. Using this code to get all the terms of current post type: $object_terms = ...
0
votes
1answer
1k views

WP Rewrite Rules - Custom post type & taxonomy

I've been beating my head against the wall for a few days trying to figure this out. I have a custom post type and custom taxonomy and I'm trying to get my URL's to work. Here is the URL structure ...
0
votes
1answer
365 views

wp_update_post based function works on existing posts, but not new posts

I have a function that will update the title of the post based on an 'advanced custom field'. It works on existing posts, but not when I create a new post. When I try and save the post and check the ...
1
vote
2answers
2k views

Include taxonomy slug in url?

I have the following custom post-type and custom taxonomy setup: add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type( 'system', array( ...
0
votes
4answers
372 views

Metabox does not show in custom post type

I am trying to create a metabox input field in a custom post type and it does not work even if I followed the instructions the best I could. I am not a PHP dev so I guess it could be just a small ...
0
votes
1answer
415 views

How to redirect wp-admin/index.php to a custom post type?

I want to redirect my index.php on the admin side to a custom post type. When I go to mysite.com/wp-admin, it must show a custom post type and not the dashboard. How can I do this?
11
votes
2answers
30k 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?
1
vote
3answers
820 views

Removing Image Sizes for Custom Post Type

I'm trying to go about this without the use of a plugin, but actions and filters Is there a way to remove extra image sizes generated by WordPress based on the Custom Post Type? I've been trying to ...
2
votes
1answer
795 views

Using custom post types in submenu + custom title

I'm planning to use a couple of custom post types for a plugin of mine. The whole plugin should reside under 1 toplevel menu item. Thus I would prefer a menu structure like so: Dashboard Posts [...] ...
1
vote
1answer
26 views

how to filter by last name for custom post

I have a custom post type (speaker) and I would like to load the list of speakers sorted by last name. I can't seem to figure it out. I tried the code from this post: ...
0
votes
0answers
19 views

Child Parent relationship with custom post types

I'm trying to create an events site. the site will have 1 event a year. I would like the site to load, for example, www.eventsite.com/2015 and this would be the home page to load the 2015 event. I ...
0
votes
1answer
911 views

Display custom post type with shortcode

I have made a custom post type for my WordPress Theme and a page where the custom post types are displayed. But does anyone know how to make a shortcode that displays posts of a custom post type?
0
votes
2answers
1k 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
16 views

Custom post type not being pulled in widget

I am creating a widget that displays data from my post type 'testimonials'. The back end of the widget is working fine and displays a list of testimonials and allows me to select which I want to ...
1
vote
4answers
890 views

How to sort list of custom posts to get view like a tree of posts under categories and their children's categories?

I'm new here and my english isn't perfect so I'm sorry for this :) I'm here because I'm workin on site with post list sorted by category and I have problem with sort out my posts in categories and ...
0
votes
2answers
19 views

How do I know the 'meta_key' for ordering my custom post type

I want to order my custom post type called sermons by sermon date, not the date entered. See here: http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters How do I know the ...
0
votes
2answers
29 views

Custom post type URL

I have a page called "News", and I have created a custom post type for news. In "News" page I need to show all news custom posts and they need to be clickable. "News" page url is ...
0
votes
5answers
7k views

get term archive url / link

I created custom post types & custom taxonomies for these. Example: actors (taxonomy) for movies (post type). Now I want to show up in my widget some terms and a more link for the actors terms ...
4
votes
3answers
3k views

Using save_post to replace the post's title

I am using custom posts, and in these, I don't a need for the title. This causes Wordpress to set the titles of my posts to "Auto Draft". I'd like to change the title's value to something else, ...
0
votes
1answer
517 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
3answers
787 views

Get custom post type parent category

I'm creating a custom post type like this: function btp_work_register_post_type() { $args = array( 'label' => __('Works', 'btp_theme'), 'labels' => array( ...
0
votes
0answers
29 views

Show Post title and featured image outside of the box

I'm trying to work out my idea to show post featured image and post title outside of the post content. Let me explain better. I'm using underscore framework. There are three files there. single.php, ...
2
votes
5answers
3k views

Get count of custom post type created by current user

I'm trying to get the count of published posts in a custom post type for the current user (to display on a profile page). I found this here on the forums: <?php global $wp_query; $curauth = ...
2
votes
2answers
43 views

Limiting number of custom posts shown on taxonomy page

I am using a custom post type that uses two taxonomies "colour" and "style". I have a script (from this thread) which groups them together so when you are on a colour taxonomy page they are grouped by ...
0
votes
1answer
472 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 ...
1
vote
3answers
601 views

Problem excluding category from get_next_post

I have a custom post type called "exhibitions" that uses the native "category" taxonomy. I have three categories: Current, Past, and Featured. Posts get marked either Current or Past and some are also ...
0
votes
1answer
1k views

Why does 'exclude_from_search' exclude a custom post type from WP_Query?

In WP 3.1, it appears that setting 'exclude_from_search' = TRUE for a custom post type excludes the post type not just from searches on the front-end, but also from any post query using 'post_type' = ...
0
votes
1answer
75 views

the_permalink() leads back to homepage

I am trying to create my first wordpress theme. But I have run into som problems. When I click the link (the_permalink()) it leads back to the homepage. I get the right URL but the URL is showing the ...
0
votes
0answers
20 views

Custom post type: require adding feature image

My plugin contains a custom post type and I would like to force the user to add a featured image for publishing the post. I don't find anything in the Wordpress references regarding this.
0
votes
2answers
679 views

Paginate_links links not working accordingly to how I do query the page

Ok, I've a custom post type page to which I have attached the paginate_links function to navigate through the elements. If I don't do anything and let WP using whatever mechanism is attached to the ...
0
votes
1answer
385 views

Wordpress monthly archive links result in 404

When I use the archive widget in a sidebar, it creates the normal monthly post archive listing like the following: February 2014 January 2014 October 2013 and so on. Whenever I click on these ...
0
votes
0answers
9 views

Agent post-type

I try to make custom post-type for my theme which I can add information about agents. Which I found of post-types all are just like ordinary post sharing with title-content-comments... But what I need ...
0
votes
1answer
13 views

Custom post type updated to support comments, yet comments don't appear

I have several different custom post types. One post type did not display the comment section, today I found out it was because I forgot to add it to the "supports array" ...
0
votes
2answers
395 views

Setting a custom $query->query_vars['meta_key'] breaks the WordPress menu

First of all, my problem is very similar to this one: http://stackoverflow.com/questions/10629245/wordpress-menu-disappears-when-query-query-varsmeta-key-is-set However, the answer accepted for this ...
0
votes
2answers
41 views

wp_editor for custom post type doesn't save value

I have done this so many times but facing problems with meta boxes and wp_editor these days, lot of notices, errors and strange behaviour. I have been able to solve problem with meta boxes notices ...
1
vote
2answers
1k views

Custom Post Type Taxonomy Filters

Im really struggling to piece this functionality together, and hope someone can help or provide snippets to get me there. So I'm creating a section on a website where stories are published, I have ...
0
votes
0answers
28 views

Custom taxonomy term in post type url 404 problems

I'm trying to create a custom url structure in wordpress. I have a custom post type called "vakanties" and a custom taxonomy for that post type called "vakantie_categorieen". I want the following ...
0
votes
0answers
33 views

Adding a menu item for a Custom Post Archive

I've created a Custom Post type (project) and it works perfectly. I have a custom archive page (archive-project.php), and that works great, too, but what's the best way to add a link to that custom ...
0
votes
2answers
2k views

Show custom taxonomy inside custom menu

I have a custom menu using add_menu_page: add_menu_page('My menu' , 'Some text', 'read', 'nwcm'); Under it, I show a custom post type menu item; // Create the news custom post type ...
0
votes
0answers
23 views

Displaying multiple custom meta fields on the fronted

I am trying to simplify how I display multiple metabox entries on my front page through a custom theme panel. As of right now I have a custom panel called explore which is programmed in my custom ...
1
vote
1answer
426 views

301 redirect for converted post type

I just converted my posts from the default 'post' type to a variety of different custom post types based on what category the post is in. E.G. Posts in the "News" category are now a custom post type ...
3
votes
3answers
7k views

WP insert post and custom taxonomy

I have create a custom post type in my WordPress attached with a custom taxonomy. The post collect date from the from end of the web site by using wp_insert_post(). This is my Custom post ...