The custom-post-type-archives tag has no wiki summary.
9
votes
7answers
6k views
Adding custom post type archives to a WordPress menu
Is there a way (besides adding a Custom Link) to add a custom post type archive to a menu in WordPress? If it's added using a custom link (e.g. /cpt-archive-slug/), WordPress does not apply classes ...
5
votes
1answer
2k views
Custom Post Type Template - Archive
I have a custom post type, called 'job', and I have the following templates in my theme:
single-job.php (works fine, displays single job as expected)
archives-job.php (is not recognized?)
...
5
votes
1answer
70 views
How do you create an archive for a custom post type from a plugin?
So I'm creating a plugin to create buildings that list condos for sale. The simplest way to do this was to just create a custom post type for the buildings and then the listings but I'm now stuck on ...
5
votes
1answer
233 views
Custom post type yearly/ monthly archive permalinks
I have a custom post type "news" in my Wordpress site. I am using Advanced Custom Fields plugin to add meta data to each post.
I want to create an array of news items as an archive:
[2013]
...
5
votes
2answers
705 views
How to set a custom post type to have viewable future posts
I've setup a CPT to act the same ways as posts but used to post event details.
Thing is that some of the posts are in the future and such have a future date set on them. Problem is that normal users ...
4
votes
2answers
151 views
How to seamlessly redirect between different archive and singular slugs?
I have a CPT with slug function (singular) and archive slug functions (plural).
Permalink structure for:
singular is /function/[postname]/
archive is /functions/[page-x/].
(can poke live at ...
4
votes
1answer
1k views
Custom Post Type Archives by Date with Custom Permalink
I'm a bit stuck with getting the custom permalink for custom post type (CPT) archive to work.
I've registered my 'press_release' CPT as following:
add_action('init', 'press_release_post_type_init');
...
4
votes
1answer
609 views
How to filter custom post type archive by meta value
I have a problem where I'm trying to build a calendar plugin for a client. I'm having trouble getting a date based archive for the custom post type I'm using. I'm not too well versed in how the ...
4
votes
1answer
1k views
Sort Custom Post Type Archive by Taxonomy Term
What is the best method (as of 3.1 or 3.2 beta) to sort a custom post type archive by a given taxonomy term?
I'm trying to make a staff page and I want to sort employees by department. So the ...
3
votes
1answer
3k views
Get monthly archives for custom post type
I know this is a rather common topic, but I can't seem to resolve the issue I'm having. Any help is greatly appreciated, I'm spinning my wheels at this point.
Using Custom Post Type UI plugin, I've ...
3
votes
3answers
592 views
Custom Post Type Archives with 0 Posts Redirects as 404
I'm working with the new custom post type archives in 3.1 and I noticed that when my post type has 0 posts, the archive for the type results in a 404. Looking at the order of hooks being processed, ...
2
votes
1answer
739 views
How to use a custom post type archive as front page?
I'd like to use a custom post type archive as a site's front page, so that
http://the_site.com/
is a custom post type archive displayed according to my archive-{post-type}.php file.
Ideally I ...
2
votes
1answer
619 views
Get custom post type slug for an archive page
How do I discover the custom post type slug when I'm on an archive page?
For instance if /products/ fires the archive-products.php template, how (pragmatically) do I get the post type slug?
Thanks
2
votes
1answer
87 views
Custom Post Type / Taxonomy Slug / Post Title with post type archive
I've tried plugins, read through stack and spent hours on this, and I just can't seem to find a way to achieve what I want.
I can achieve the following permalink structure:
...
2
votes
2answers
529 views
How to list custom post types?
Here's what I'd like to do:
a) Create a custom post type and write panel for a menu item called "My Stuff."
b) "My Stuff" will behave like a category -- but the content will not appear in the main ...
2
votes
1answer
91 views
Archive template
I have several custom post types and we need to create separate archive templates for these. I tried the following advice, but it's still using the default archive template.
In the form of the ...
2
votes
1answer
611 views
Display Next/Prev when looping Custom post-types archive?
I'm trying to display the Next/Prev navigation buttons on my page which displays all of the pages within my 'events' custom post-type. The issue is that the buttons are not even displaying, but I have ...
1
vote
2answers
1k views
List all posts in Custom Post Type but group dynamically by Custom Taxonomies
I have a custom post type named "Resources" which has a Taxonomy named "Types."
I have it manually pulling each term which isn't the most elegant solution and every time there is a new term added, I ...
1
vote
2answers
61 views
Have a Custom Post Type index page display taxonomy items instead of posts
I have a CPT registered that is called lessons with a custom taxonomy (category) that is called courses. I want the /courses page (archive-courses.php?) to display the individual courses (i.e. "online ...
1
vote
1answer
70 views
Custom Post Type archive as front page
I basically have the same problem like in this question, but the correct answer doesn't work for me. Yes, I get a list of posts from my CPT, but the archive-{post-type}.php is not used to render the ...
1
vote
2answers
135 views
Loop that displays the first post of every available custom post type?
Is it possible to create a loop that goes through all the available custom post types without statically defining what those custom post types are, and then displaying the featured image of the first ...
1
vote
2answers
465 views
Archives for custom post type based on a “date” meta value
I've got an "Event" custom post type. Each post has a meta field for the actual event date, which cannot be the posts's publish date, as most all the event dates will be in the future.
With that, I'm ...
1
vote
1answer
747 views
Archive list for custom post type categories
I am using a recipe plugin that uses a custom post type of 'recipe'. I currently have multiple lists of recipes from each category on a page. I am trying to get the title of each category list to link ...
1
vote
1answer
465 views
I can't set meta_key in my custom post type query
I've created a custom post, events, and saved the meta data event_year to each event. I'm trying to get a year's event archive. When I go the the following URL, the meta_key and meta_value are not ...
1
vote
1answer
314 views
Add the current menu item CSS class to a custom page type archive in Wordpress menu
I've been reading a lot about this but couldn't find a solution.
Basically I'm trying to show a current menu item on a dynamic page that is created by a custom page type archive.
The default menu ...
1
vote
1answer
111 views
Custom-post-type-archive: posts sorted/filtered by year?
I have a custom-post-type wr_event whose posts are sorted by meta_key "event_date".
Therefore I have this handy function …
function get_event_list( $latest = true, $order = 'ASC' ) {
echo ...
1
vote
1answer
57 views
How should I structure my post types?
For the site I am making, I have a few post types: News, Events, Projects, Placements. Each one of these post types will need its own archive page, accessible through the navigation. I am able to ...
1
vote
2answers
176 views
Second Custom Post Type Archive
I've got an event custom post type, and using filters, I've configured the archive page to show only event in the future, and in chronological order based on a meta value (start date).
I want to make ...
1
vote
1answer
189 views
Custom archives function
I'm working on building a custom archives page for my church's website. On my archives page I want to have last week's sermon shown at the top in a special box, followed by the future sermons and then ...
1
vote
1answer
434 views
Extending AZIndex plugin to use custom post types and custom taxonomies
I desperately need to be able to display something exactly like this:
http://bottlesup-07112011.31two.com/bottlesup-retailers/
5 columns of custom post type posts sorted alphabetically by custom ...
1
vote
1answer
144 views
How to use has_archive but disable feed per post type?
What is the best way to disable feeds per post type but keep has_archive enabled?
1
vote
1answer
493 views
An empty Custom Post Type Archive page returns 404 in WP 3.1
I have set up a Custom Post Type called "Portfolio". If I view the CPT's Archive page without adding any posts to it (/portfolio or /?post_type=portfolio), it returns a 404 page. Is there a way to ...
1
vote
0answers
118 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 ...
1
vote
0answers
40 views
List Custom Post Types by Date Archive [duplicate]
Possible Duplicate:
Rewrite rule for Custom post type Monthly and Yearly archive
I'm not sure if I'm missing something or what! But I've been trying to get this right for past couple of ...
1
vote
0answers
315 views
Date archive shooting 404 when months and days are quarried [closed]
I know you guys have seen hundreds if not thousands of 404 questions.
I assure you I have done everything in my power.
1. updates permalinks
2. using /%post_id%/%postname%/ for structure
3. have ...
0
votes
1answer
43 views
Post type archive page not working
I registered a custom post type using Custom Post Type UI, and created an archive page and named it archive-recipe.php, 'recipe' is my custom post type name. But its not working, instead its using the ...
0
votes
2answers
238 views
paginate function in archive for custom-post-type
I have a custom-post-type for events and use the normal archive.php template to list all previous events.
The thing is that I use a custom query for my event-post-type inside archive.php like this …
...
0
votes
1answer
42 views
How to use WP_Query in a CPT achive page?
I can't get WP_Query to work in my custom-post-type archive page. Can someone please tell me what I'm doing wrong? I would appreciate any help.
Here's the code in archive-bulletin.php:
<?php ...
0
votes
1answer
207 views
Custom posts not paginating on archive page and returning 404
I'm trying desperately to get the pagination on my custom post type archive page to work, but I keep getting a 404 error whenever I click on <?php next_posts_link('« Older Entries') ?> ...
0
votes
2answers
499 views
Sort custom posts in archive by multiple values: date AND meta key
I have a post type and I want to sort posts in its archive according to two values:
by a meta value called "artwork_year" which contains a 4 digit number (year)
by post publish date
what the query ...
0
votes
3answers
900 views
current-menu-item not added on page showing custom post type (rendered with archive template)
I have setup a custom post type called 'expertizeom'
I have setup a page called "expertize" and added to my custom menu
(site main nav).
The page is rendered with an archive called ...
0
votes
1answer
224 views
Custom Post Type Query issue
I have a conflict issue with 2 custom post types. I have a template file archive-media.php and have created the related 'media' custom post type. This all works well, however in the sidebar I have a ...
0
votes
1answer
579 views
Alphabetically sort a taxonomy.php template by post title
Simply put, is it possible to sort a taxonomy.php template via the same methods you can with something like wp_query so that the archive shows all posts in an ascending order alphabetically by title?
...
0
votes
1answer
475 views
Page is defaulting to archive page and not designated template
I created a page called "Projects" through the wordpress admin
I created a template called "Projects"
Set the "Projects" page to use the Projects template.
How come when I navigate to the Projects ...
0
votes
2answers
118 views
+50
Rewrite custom post type url's adding meta box values
I've got these custom post types (CPT) and meta boxes:
Movies (CPT)
Genre (Meta box)
Genres (CPT)
If one movie is called Die hard then I want the permalink to be:
/genres/action/die-hard
This ...
0
votes
1answer
17 views
How to get type of archive whether it is post or date or category archive?
using function is_archive() we can know whether it is archive page or not.
But if it is archive page how can i find whether it is author archive page or category archive or date archive.
I have ...
0
votes
1answer
22 views
Specify a Page as the parent to the CPT Archive
I have an "About Us" page on my site with some child pages. I have created a "History" custom post type, where the rewrite slug is 'history'.
I use archive-cpt_history.php as the template file for ...
0
votes
1answer
70 views
My archive-posttype.php template is not loading
I'm trying to create an archive-photos.php template for my photos custom post type. The problem I have is that when I view the page it is the archive.php template that is used, not the ...
0
votes
1answer
104 views
Custom post type category permalinks and archive pages
I know this question was brought up before, but I can't seem to get things working using any of the proposed solutions. This is how I have my custom post types and categories setup:
Custom Post Type: ...
0
votes
1answer
40 views
Permalinks that go to a specific template
This is actually my first question here, so hello to everybody in this community!
I have developed a theme with a custom post type and a template (lets call it "my_template.php") that shows posts of ...
