Questions tagged [custom-post-type-archives]

Filter by
Sorted by
Tagged with
0
votes
1answer
14 views

CPT pagination on Archive page 'No Posts Found' on /page/2 [on hold]

I have an archive page for a CPT which should paginate after 6 items. When I click on the link to go to the 2nd page, I get a Page not found. The URL says {CPT}/page/2, and the content of the page ...
0
votes
0answers
20 views

How to make archive of categories subcategories for custom post pages that distinguish between CPT

I have a problem I have 4 different custom post types readymade_public readymade_private collections_public collections_private And the structure is something like this is going to work ...
0
votes
0answers
30 views

Overriding the template files using a plugin for all themes

I believe these are the common filters to use when overriding a template template_include single_template page_template archive_template The works but it seem that they are theme depended. I am ...
0
votes
1answer
26 views

Custom post type, global categories — what’s the template name?

The documentation for template hierarchy for custom post types (CPT) includes: Either for the CPT itself (archive-cptname.php) Or for custom taxonomies (taxonomy-taxonomyname.php) Or for overall ...
1
vote
1answer
26 views

CPT Archive with core Category

I have a custom post type of news_archive and they are using WordPress Categories. I would like to get some archive pages for these categories with only the CPTs and not core Posts. I managed to come ...
1
vote
1answer
63 views

Custom template won't load for a custom post type (custom permalinks used)

I created a custom taxonomy for my custom post types. function create_states_hierarchical_taxonomy() { $labels = array( 'name' => _x( 'States', 'taxonomy general name' ), 'singular_name' ...
0
votes
1answer
20 views

Custom post type archive with page as parent url

I have a custom post type called articoli-redazione. I would like to make archive url of this kind of post type to have a PAGE as parent as in this example: https://mywebsite.it/page-name/custom-...
0
votes
0answers
13 views

How can you display archive in grid form for a post type?

I want to upload a bunch of art and comics, and to do so I am using the plugin 'webcomic' Each collection is set as its custom post type, and the archive is presented as a list with thumbnails and ...
0
votes
1answer
20 views

Do not show child pages within a file page

I have a CPT created, in my CPT file page the father pages and daughter pages are shown. Books of science Book 1 Book 2 Books of science fiction Book 1 Book 2 In my case I don't want it to ...
0
votes
1answer
31 views

Use the custom post type archive for taxonomies?

Im using a archive-cpt.php template page to display all my custom post type posts but now I will be categorizing them in taxonomies. I want to add a dropdown filter navigation that will be populated ...
0
votes
0answers
40 views

Display post date with the date archive link for custom post types

i have a custom post type and every single post it displays post date like 05 Jun 2019. i show this date with this code : <a href="<?php echo get_day_link(get_post_time('Y'), get_post_time('m'),...
0
votes
0answers
12 views

Check if there are posts with specific ACF field value in current archive query posts

I developed a custom ACF field archive filter which lets you filter posts with ACF fields - similar to Woocommerce product attribute filters. It loops thru all fields in a field group and echos all ...
0
votes
0answers
17 views

Isotope + infinite scroll

I created a custom post type and I want to list the posts with isotope.js filters and with endless scrolls for paging. If I click on the filter button and the item is not on the second page, it does ...
0
votes
2answers
27 views

How to have a dynamic slug and rendering the archive-{post_type}.php?

So I have a Custom Post Type named network and Custom Taxonomy name company_category. Everything is all good until I can't render http://localhost/digitalhxstaging/company. Both Company Category and ...
0
votes
0answers
10 views

How do I building my own filters for a blog page?

New to wordpress wanted to ask the community if there are any tutorials teaching you how to build filters and getting them to display blog post based on the filters I want to learn so don't want to ...
0
votes
3answers
111 views

How to show category list in WordPress

If anyone know, if there's plugin to customize taxonomy list it will be faster to do. But here's my question. i create post type "product" and the categories. inside post type product, i make ...
0
votes
1answer
33 views

How enter custom post meta or custom field on box post list archive page?

I ask a question that I think many people are interested in knowing the answer. What I really can't do with wordpress is to insert custom meta or dynamic custom fields into the post boxes (on the ...
0
votes
0answers
11 views

How might I display the childless and the children of a custom taxonomy separately on a taxonomy page?

The structure is simple, most posts will have only one category but some might be in a child of that category. I want to display the ones without a child category first, and then all the posts ...
0
votes
0answers
11 views

Custom post type category Page not showing post of particular category

I have created a custom post type "Highlights" function create_post_type_highlights() { register_post_type( 'highlights', array( 'labels' => array( ...
0
votes
1answer
55 views

How to display the_archive_title() and the_archive_description() - “weird” interaction

I've got the following code in my "pagetitle" template partial: <?php the_archive_title( '<h1>', '</h1>' ); the_archive_description( '<span class="archive-description">', '</...
0
votes
2answers
33 views

Tell wordpress to show a single page instead of an archive page

my wordpress site urls like this: https://example.com/?pid=a125a5&lang=en and query of my archive page like this: <?php $the_slug = get_query_var('pid'); if ($the_slug){ if ( $post = ...
0
votes
1answer
143 views

Display Custom Post Type Archive content with Shortcode

So I've created a custom post type filled with Advanced Custom Fields only. There is no "content". I've created a single-custom.php, content-custom.php and archive-custom.php. All looking nice and ...
0
votes
0answers
41 views

Permalink for custom post type pages not working

Having some trouble with pagination and custom post types. I have 3 custom post types active currently: 'webinar', 'resource', and 'faq'. For each of these custom post types, I'm using the archive-{...
2
votes
0answers
26 views

I am facing problem in my archive page , it is partially working

I am using wordpress 5.1 and I am creating a blogging website. I am having an issue in my blog posts: when I click the permalink(link) of category it is showing the output but when I click the author ...
0
votes
1answer
35 views

Group Archive list by posts tag

I'm trying to make some archive list where the posts (some custom type posts) are grouped by a tag, or maybe a custom field, I was trying to replicate How to group by taxonomy on Custom Post Type ...
0
votes
1answer
110 views

WordPress alphabetical A-Z custom post type post result display

How to display WordPress custom post type result alphabetical letters or pagination? for a example i have a post type called "homeless". under homeless there are 50 states (categories). there are 259 ...
1
vote
2answers
290 views

Custom post type archive sorted and grouped by date in post meta field

I am trying to build an Custom Post Type for showing information about events. The Custom Post Type has name 'Event', with the following meta fields: event_startdate (date in format YYYY-MM-DD) ...
0
votes
1answer
61 views

Add parent post to Custom Post Type [closed]

how can i add a parent post to my custom post type ? I found an example : function codex_custom_init() { // Our People $people_label = array( 'name' => 'People', 'singular_name' => '...
0
votes
1answer
34 views

Custom Post Type archive page listing a 404 or single post

I want to preface this by saying we HAVE tried saving and re-saving the permalinks structure. We are developing a custom theme and have a few custom post types in our theme. An example of one of them ...
0
votes
0answers
15 views

Pretty Post Type/Taxonomy URLs for Archives While Keeping Post Type/Post URLs Intact

This question expands the following: Permalinks: custom post type -> custom taxonomy -> post This works all well and good... however, I have an existing site that I'm trying to improve and, ...
0
votes
0answers
94 views

Pagination not working past page 3 on archive page of category

I have a custom post type of "show" and within that custom post type I have set up a taxonomy / category called "venue" which has two options "venue-one" and "venue-two" (slugs). On the two archive ...
0
votes
2answers
17 views

URL rewrites af

I'm trying to make some pretty URLs that show content from a category page. An example would be this: https://example.com/resources/white-paper (not a real WP page) would show content from https://...
0
votes
0answers
175 views

Genesis custom loop for archive page

I know this question has been answered before but for the life of me, I can't find it anymore. I created a few custom post types and custom fields using ACF, now I know how to display the info in my ...
0
votes
1answer
185 views

Change Title Based on Taxonomy Filter in archive-{cpt}.php

So I have page in Custom Post Type RENTAL with following custom taxonomies: Merk -- with terms: Honda, Daihatsu, Toyota, etc Kendaraan -- with parent terms: Mobil, Bus, Motor; & child terms: MPV, ...
1
vote
4answers
402 views

Add custom post type archives to search results?

How do I get WP search results to include custom post type (CPT) archives? For example, if I have CPT 'career' whose title (in the template php) is 'Careers', how do I get search results to include ...
0
votes
0answers
55 views

Set archive of custom post type like 'posts' page in reading settings is set

I'm starting development on a WordPress site soon. For a specific post type, they want the archive to be part of the page structure. For the default post type, you can set the archive to a static ...
0
votes
1answer
826 views

Custom Post Type WP_Query with filters and search

I have a custom post type called "doctor", this is the query I have set for displaying all the posts in the archive template: $args = array( 'post_type' => 'doctor', 'orderby' =...
0
votes
0answers
57 views

Routing for a post type archive with custom taxonomy as a url parameter

Essentially, I have a custom post type product and it uses a taxonomy product-categories. I currently have my routing configured to use the top level category as part of a product url, e.g products/...
-1
votes
1answer
104 views

%20 in URL in archive page shows error 404 on page [closed]

I have made a custom archive page, so the page is working for single words like - National Category. For this the archive page works as it should be but when it comes to two words like - Economy and ...
3
votes
2answers
120 views

Is it possible to remove the posts_per_page limit on a specific post type?

I'd like to know if I can remove the limit on the posts_per_page for a specific post type. In the archive.php page I'm displaying different post type, and for the specific "publications" post type I ...
0
votes
0answers
19 views

Custom taxonomy for custom post type permalink and archive page

I have 3 custom post type which all have custom a defined taxonomy. For example for the first post type publications i have the custom taxonomy publications_types. The URL structure is thus as ...
0
votes
1answer
16 views

Building Link List for Custom Tax

Just wanted to get an opinion, or ideas. I have an CPT called "Listings", and a custom taxonomy for it called directory-category. I have put together the below function to generate a list of links ...
2
votes
1answer
174 views

Ordering Posts Type A by Custom Fields of related Post Type B

I'm not sure if this is even possible (also posted to ACF forum https://support.advancedcustomfields.com/forums/topic/ordering-by-custom-field-of-relationship-field-object/#post-62454) I have two ...
4
votes
1answer
828 views

pre_get_posts with tax_query causes empty result

I need to adjust the main loop for all archive pages in the following way. I have registered a custom taxonomy "myposttypes". Every single post is assigned to exactly one term of "myposttypes". If it ...
0
votes
1answer
76 views

Custom taxonomy with custom post type archive page

I created a sustom taxonomy and a custom post type via Metabox plugin. I am able to create custom post type posts and assign them to the custom taxonomies. But when I am trying to list them on an ...
2
votes
1answer
2k views

How to rewrite slug of custom post type archive page

I have a CPT called "case-studies" and the slug of the archive page of this cpt is www.my-domain.com/case-studies and the slug of the ctp posts is www.my-domain.com/case-studies/case-study-name. Now, ...
0
votes
1answer
80 views

Custom post pagination not working

I have a big problem with my custom post pagination on home.php page. It shows the first 4 post but when I go to the second page I get a page with only the header and footer but no news content and no ...
2
votes
1answer
248 views

How to remove current year from wp_get_archives

Does anyone know how to exclude the current year from $args = array( 'limit' => '', 'format' => 'html', 'before' => '', 'after' => '', '...
0
votes
0answers
32 views

Custom Post Type / Taxonomy / Term - what template to use to avoid 404-page?

I'm working on a site and am using Custom Post Types, Custom Taxonomies and Custom Terms for the first time. All goes well until I click a custom term. What I'd like to happen is get a page listing ...
0
votes
1answer
26 views

Custom Post Archive - display page 1 differently then subsequent pages

I have a custom post archive listing of publications. The template generally works fine, but I'm trying to display the excerpt (actually a custom field called Abstract) for just the most recent ...