Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [custom-post-type-archives]

1
vote
2answers
30 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
20 views

Add parent post to Custom Post Type

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
29 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
10 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
27 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
13 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
53 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
48 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, ...
0
votes
4answers
46 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
30 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
230 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
27 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
37 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
108 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
12 views

Custom taxonomy for custom post type permalink and archive page

I have 3 custom post type which all have custom a define 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
12 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 ...
1
vote
1answer
86 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 ...
0
votes
0answers
237 views

Custom Taxonomy On click filtering on Custom post type Archive

My need is to create an onclick filter on a custom Post type called "Recipes" with the Custom taxonomy "recipe_category" created with ACF in the theme I've buyed. This is my archive.php code: <?...
4
votes
1answer
245 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
58 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 ...
0
votes
0answers
25 views

Author Archive Page just Show Default Post, not my CPT created using Pods Framework

I had a little problem when I created the archive page for the Author to show my CPTs and Default Post created using Pods Framework on a page, at a time. I made some CPTs called "Literature" and "...
1
vote
1answer
882 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
0answers
20 views

Page under post type archive

I've been trying to figure this out for a long time and haven't found anything online to help achieve this. Say I have a custom post type "event" with an archive of "/our-events". Each single event ...
0
votes
0answers
227 views

Remove prefix from archive titles for: category, tag, author, date, custom post

I'm at the beginning of my template journey and appreciate this community so much! I'm removing the title prefixes from my archive pages and I've looked at several answers including: Remove "...
0
votes
0answers
42 views

How to create multiple parameter archive pages (i.e. something like /$post_type/$taxonomy/$term/)?

Basically, I have three custom post types: videos, news, & reports and a couple custom taxonomies: region & blog — that I'd like to create "sub-archives" for, using the following structure: /$...
0
votes
1answer
67 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 ...
0
votes
0answers
34 views

How to display value of custom fields on schema on taxonomy archive

I am trying to display the code <meta itemprop="name" content="<?php woocommerce_page_title(); ?>"> <meta itemprop="ratingValue" content="<?php echo get_post_meta( get_the_ID(), '...
2
votes
1answer
171 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
27 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
0answers
37 views

Sort by custom field in archive.php with Ajax

how can I sort custom post types by custom field value with ajax. There should be options "Newest" and "Oldest".
0
votes
1answer
23 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 ...
1
vote
0answers
123 views

Single post with a Custom Post Type returns 404, when archives of the CPT work correctly

I have created a custom post type called "medya" with the codes below: <?php function create_posttype() { register_post_type( 'medya', array( 'labels' => ...
0
votes
0answers
57 views

Unsure what page hierarchy to use with CPT UI to show on front end

I created a custom post type using the CPT UI plugin and chose to add Categories as well. In my menu structure I have a second level item which is a category and a third level item which is the actual ...
1
vote
1answer
44 views

CPT archive admin menu label

I'm using the following code in order to make a cpt: function midas_team_post() { register_post_type( 'midas-team', array( 'labels' => array( 'name' => 'تیم میداس', ...
0
votes
1answer
291 views

Create search box on Archive Custom post type

I'm trying to create a search box on an archive page which shows on Custom post type. I've followed this guide to implement the search box on the archive page: http://wpsnipp.com/index.php/...
1
vote
0answers
26 views

Number of Custom Post Types published are not being shown in the custom page

NOTE: If you're new to this question, it is already solved you just need to add the 'posts+per_page' parameter in the new WP_Query array... I wonder why they(stackoverflow developers) do not give ...
0
votes
2answers
22 views

I created a normal page, but the page displays as an archive page

I have created a normal page called "Clients," which should display the logos of my customers. But the page displays as an archive page. The page I'm talking about is http://zedwrites.com/clients/ ...
3
votes
1answer
111 views

Is it possible to have an index page for taxonomy term for each custom post type it is assigned to?

I currently have a setup where I have a custom taxonomy that is link to the Wordpress post post type and another custom post type. Since the custom taxonomy is assigned to the two post types ...
0
votes
0answers
20 views

My custom plugin blocks access to the image gallery

I am a beginner in Wordpress development and I am currently creating an extension that will allow me to post articles from a post type. I said that I duplicated the code to make two plugins but my ...
0
votes
1answer
150 views

Custom Post type date archive for custom taxonomy

Hello WP StackExchange, I picked up and it deals with Custom Post Type archives. So we have a CPT called Resources. Under Resources we have a custom taxonomy called Resource Types. For Resource ...
0
votes
0answers
211 views

Custom Post Type archive link in WYSIWYG editor

I would like to add a link in the WYSIWYG editor to the archive page for a custom post type. I have a custom post type case-studies and would like to add a link to the archive page in the tinyMCE ...
0
votes
1answer
771 views

Change number of posts to show on Archive page (custom post type)

I've created a custom post type, and I've created an archive page to show them on this page. The number of posts shown by default is 10 but I'd like to reduce the posts' number to 6. I use this ...
1
vote
1answer
175 views

is_main_query() not working for WP REST API

My initial situation is, that I have a custom post type events which are - who would have thought - events. There is a custom UI (backend) where the user can enter multiple dates. Each date is then ...
1
vote
1answer
136 views

Set up Custom-Post-Type Author Archive

I’ve set up a custom-post-type on a site for jobs, and this all works fine. When I click on the author (my name) on the Custom Post Type though it goes to the archive.php file (as you can see in the ...
0
votes
0answers
66 views

CountUp timer for custom post

I have count up timer for my custom post. Each post is with different date to count up from , but the javascript currently is taking one date and all posts are counting up from same date. Here is link ...
0
votes
2answers
400 views

Changing number of posts per page on CPT-archive.php, have tried 20-30 code chunks so far

I've been trying to change the number of posts that is displayed on my CPT movie-review archive page and I've tried about 20 - 30 different variations (and even a few plugins), but no luck. It is ...
0
votes
1answer
506 views

Custom post type search with slug in URL

I have a site which has 6 custom post types, each one has a search function to only search in that particular post type. The search works as expected and displays the search results. Each custom ...
0
votes
2answers
407 views

Show categories of custom post type and not all posts

I have this page on my website - It's a custom taxonomy template for a custom post type called Directory Entries with a taxonomy called directory_entry_type which is what's being pulled in here. ...
0
votes
2answers
555 views

Only show categories that have posts within custom post type

My custom post type & built in Wordpress blog posts SHARE the built in categories. I have a piece of code that loops through and shows all (built in) categories that have posts assigned to them ...
1
vote
2answers
1k views

Check if is post type archive and in category

I'm trying to adjust a function that checks if the site visitor is on a post type archive and returns a certain layout. I need it to also check to see if it is in certain categories (using regular WP ...