Tagged Questions

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

learn more… | top users | synonyms (1)

0
votes
1answer
28 views

Get link for feed of specific post type AND taxonomy

I am able to get a specific post type with http://www.mywebsite.com/feed/?post_type=post-slug&topic=accountable-care-organizations, but when I try ...
0
votes
1answer
206 views

Displaying Page as Custom Post type landing Page

Custom Post-Types are awesome and a PAIN at the same time. Basically, I need to have a landing page, with the list of the direct child elements of the post type (think product categories), but also ...
0
votes
0answers
47 views

Need an idea about how to open a popup which contain only post created form in wordpress admin

I need an idea about how to open a popup which contain only post created form in wordpress admin. What I am doing is, I created a custom post type and in that I added dropdown of normal posts. admin ...
4
votes
1answer
458 views

How do you get the count of posts in an archive page?

I have a custom posts archive page of the type archive-my_custom_post_type.php and I am using the "standard" loop which consists of the ever-so famous <?php if(have_posts()) : ?> <?php ...
0
votes
0answers
11 views

Why do all my custom post types return a 404, even after resetting the permalink? [duplicate]

I have two custom post types setup like this: add_action( 'init', 'create_post_type_News' ); function create_post_type_News() { register_post_type( 'news', array( 'labels' ...
0
votes
1answer
214 views

How to display custom message for (Genesis) featured posts if no posts

I'm using the Genesis Framework, and the custom post types featured post widget (code below). I need to display a custom error message for a particular post type if there are no post present for that ...
0
votes
2answers
36 views

Archive not sorting correctly

I have a custom post type called "cif-events" and I want to sort by the value in wpcf-start-time. I added the following to my functions.php: add_filter('pre_get_posts', 'set_order_for_archives'); ...
4
votes
1answer
1k views

How to make a WP_Query search with custom post types?

I've registered a custom post type called "node". When I create a basic WP_Query to get posts of that type, it works just fine. Example: $args = array( 'post_status' => 'publish', 'post_type' ...
2
votes
1answer
117 views

Make Custom Post Behave Like Normal Post?

Is there a way to force Custom Post Types to behave as normal wp posts? Hi - I need some help adding a custom post type to my theme's posts section. The posts page is a static page using a template ...
1
vote
2answers
294 views

Count all comments of a custom post type

I know how to count comment per post, user and in total but i am having problems getting the total amount of comments post in a specific post type. I guess i can loop trough all the posts and count ...
0
votes
0answers
144 views

Remove ?preview=true from the address of custom post types

For some reason because i am using a custom function the preview doesn't work. http://www.domain.com/template-for-rent/?preview=true leads to 404 Page not found. However, ...
0
votes
0answers
114 views

Custom post type/taxonomy and pages rewrite conflict gives 404

I have set up a CPT called 'question'. For this CPT I am using a custom taxonomy called 'profession', consisting of terms such as 'doctor' and 'plumber'. I am also working with standard pages. When ...
1
vote
0answers
36 views

Filtering results for post_type tells me I don't have permission

I have a post type that for some reason I am unable to access. Here is the message I get when I try to access it: You do not have sufficient permissions to access this page. edit.php?post_type=alt ...
0
votes
0answers
29 views

WP_Query For Custom Author and Single CPT Search?

I have created a search page where users can search the site with these options: (1) Keyword (2) Keyword in/from 12 different Custom Post Types (CPT's) (3) Keyword in/by a single Author's posts ...
-1
votes
1answer
29 views

Why do I need to register my custom post type a second time when flushing rewrite rules?

If I register my custom post type when the init action fires (which is before plugin activation) why do I need to register my custom post type a second time when flushing rewrite rules (on plugin ...
1
vote
2answers
110 views

Custom Posts on homepage

I'm just getting my feet wet with creating a custom post type (which is up and running). I'd like to display the CPT alongside other posts on my homepage... I can't figure it out for the life of me. ...
0
votes
1answer
326 views

Custom post type single page (single-{CPT-name}) 404 when slug includes hyphens

I have a CPT called "author". After an hour searching why I get a 404 visiting single pages of this CPT (managed by template "single-author.php") I realize that some do work: those whose slug doesn't ...
0
votes
1answer
62 views

Registering post type is not adding to admin menu

I started playing with an idea a few days ago that will be using custom post types. I've never used CPTs before and am running into issues with the basic registration process. The following ...
0
votes
3answers
337 views

Show future events based on custom field AND order by date

I have a custom content type (event), within that type I have a custom date field, with the name: 'date'. In my template I am running the WP_Query to return a list of events. I would like to only get ...
0
votes
2answers
65 views

Add a custom post when inserting a new user in Wordpress?

I want to add a custom post type (called pupil) into Wordpress when inserting a new user. The wp_insert_user() is used for creating new users. I have this code: function ...
0
votes
1answer
104 views

Compare 3 custom fields and sort by oldest

I am building a movie archive. For each movie I am filling out the release dates for 3 countries, they're stored as custom fields (added via Pods) Now, when listing the movies I would like to build ...
0
votes
0answers
85 views

User submitted content

I have a project that requires users to register, and submit details ( information on a company ). This need to take place on the front end rather than using the WordPress admin.. I have tried ...
0
votes
1answer
72 views

Page-CPT.php redirects to archive or single.php

I have set up a custom post type called cpt_top_ten_list. I am trying to set up a page to display all of my custom post types. I've named my new page page-top-ten.php, and added a template tag at the ...
0
votes
0answers
70 views

custom post type, single category page and search form

i have created a custom post type called directory, on my directory page which lists my directories i have a sidebar which shows the categories and how many are in a category but when i click one of ...
0
votes
1answer
45 views

List Posts By Custom Taxonomy

Apologies if this is a stupid question, I've had a google and a look on the site but can't find an answer to my question. I'm working on a project and have created a custom post type called 'books'. ...
0
votes
0answers
16 views

Posts in nav menu

Hello I'm making menu and I want to add element of menu and in this element submenu which posts name and links to this posts. For example I have item menu called A->link1 to post link2 to post ...
3
votes
2answers
770 views

Adding content to archive and taxonomy pages on custom post types?

I have a custom post type named "Products" and a taxonomy called "Usage". On my "Products" landing page I'd like to have custom content that can be edited via WYSIWYG by the client. Same goes for the ...
0
votes
1answer
258 views

Roots: Custom Post Type 404 Not Found [duplicate]

So I'm trying to create a custom post type for my theme. I've written the function to register the post type and I can add a post from the admin panel, but when I try to view the new post's permalink, ...
0
votes
1answer
94 views

Can variables be used to rewrite a Custom Post Type permalink? [duplicate]

Is it possible to use a variable to rewrite a Custom Post Type permalink FROM wp_terms -> slug? WPDB: wp_terms -> slug = healthy-living A1) Current Custom Post Type args: 'rewrite' => array( ...
0
votes
1answer
62 views

Meta box with front-end styling

I have a specific Gallery post of products that I release at the start of every Monday on my website, which differs from my other Gallery posts. These types of Gallery post don't require the Authors ...
0
votes
0answers
30 views

Website page structure

How can a get my website link structure like this: mywebsite.com/products/vegetables/carrot Where vegetables is the taxonomy term and carrot is the post slug from the custom post type products. ...
0
votes
0answers
53 views

Archive Page - How to output a specific custom field instead of post content

I have several custom post types and I am using archive.php and it works fine, but now the client wants to replace the post content with a custom field called ingredients for the custom post type ...
0
votes
1answer
228 views

Masonry Append WordPress posts with singleMode

I'm using Masonry on a Wordpress site, to display posts from a custom post type (training_videos). As all the columns are the same width im using the singleMode = true option. The site is a ...
-1
votes
1answer
60 views

Themes VS Plugins [duplicate]

If I am customizing a WordPress site, should I do that via a theme or a plugin? By customization I mean: Add new custom post type Add new fields to the Users Add new widgets Add custom permalinks ...
4
votes
1answer
211 views

Category as Class for Custom Post Type

I've only just realised that custom post types don't appear to output the category as a class in the loop, via post_class and I wonder if anyone can suggest a work around. Is this something that ...
1
vote
1answer
88 views

Query custom post type in the loop

I have a custom post type running called services: // Services function services_cpt() { $labels = array( 'name' => _x( 'Services', 'post type general name' ), ...
0
votes
1answer
36 views

Restrict a filter to a custom post type. Am I doing this right?

So I had this little bit of code to short a music charts custom post type that all starts with numbers (the trick was to make the 10th position appear last in the list, not between 1 and 2): ...
0
votes
0answers
140 views

Show/Hide Custom Meta Boxes using any plugin

How can I show and hide the custom meta fields created using Advanced Custom Fields plugin? I want to handle the publish and unpublish of the fields and values from the admin panel. Is there any ...
0
votes
2answers
192 views

Structuring a product catalogue in Wordpress [closed]

I am trying to create a product based content managed website in Wordpress (by clients request). I have created a custom post type where all the products reside, aptly named 'Products'. The products ...
0
votes
0answers
250 views

Rewriting custom post type permalinks gives 404

I am using this code in my functions file to be able to include a post ID in my permalinks for a custom post type. But I am getting a 404 error when I attempt to preview view any of the posts of that ...
0
votes
0answers
110 views

Cannot modify a registered custom post type rewrite slug

I'm using this function in my child theme to modify the rewrite slug from custom post type that was registered on the parent theme. But it doesn't work. function change_rewrite_rules() { global ...
0
votes
1answer
252 views

Creating Multiple Loops in Genesis, One Post then 20, each with custom fields

I need to create a custom loop for a custom post type archive template, that is as similar to this page as possible (www.manta.com/totd) using the Genesis framework. Here is a paste of what I have, ...
0
votes
0answers
84 views

How to use if statements to check and echo terms by hierarchy in a post?

I'm seeing a lot of posts on here with helpful snippets to resolve my problem, but nothing has been specific enough to help me - or I just don't understand how to make those solutions work for my ...
0
votes
2answers
52 views

Creating two loops based on different logic

I'm trying to figure out the best way to go about this and I have part of my solution, but I can't figure out all of it. My ultimate goal is within a certain page template, to show the newest post ...
0
votes
1answer
30 views

How do I Query 2 Custom Post Types?

This is what I have, it works great except it only pulls from one CPT. I need it to pull from two. <?php $my_query = new WP_Query( array( 'post_type' => 'Portfolio' , 'Artwork' ) ); ...
0
votes
2answers
391 views

WP_Query get posts where post_name is empty

I want to get all the posts for which the post_name(slug) is not set/empty as well as a meta_key does not exist. $args = array ( 'post_type' => 'books', 'name' ...
0
votes
1answer
216 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 ...
0
votes
0answers
48 views

Custom title for custom post types

I need to change the title for a custom post type ("movie") in my site. I added the following function to my functions.php file but I see no changes in the title: function theme_wp_title( $title, ...
0
votes
0answers
127 views

Form Submit Post Front-end with Meta Boxes Included from Custom Post Type Called Testimonial

Before I post this question, I've seen many questions in here but I guess, it still makes me confused and have no idea to implemented it. Case: I've just made Testimonial Custom Post Type by WPtuts ...
-1
votes
1answer
51 views

A call to list all Custom Post Types?

My theme currently uses this code to call all Categories into a list to pull posts from (in the backend) for a thumbnail widget. $mx_categories_obj = get_categories('hide_empty=0'); $mx_categories = ...