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]

0
votes
1answer
34 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
3answers
29 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
24 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
40 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
21 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
25 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
105 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
11 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
0answers
11 views

How Can Create Separate Tender Archive Section and Current Tender Section in WordPress

I'm trying to create a WordPress Archive section for Tender, and I'm having a little difficulty with creating an easily accessible archives page. How Can Create separate Tender Archive Section and ...
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
49 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
198 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
107 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
36 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
17 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
490 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
181 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
30 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
58 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
26 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
126 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
31 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
17 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
117 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
38 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
38 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
192 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
95 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
123 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
183 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
454 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
164 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 ...
0
votes
0answers
23 views

Custom Taxonomy displays Posts page instead of displaying specific archive

I have two custom post types and custom taxonomies in my WordPress installation. The first type and taxonomy are for videos; here I'll call them test_video and video_series. The second type and ...
0
votes
0answers
145 views

Category Archive Loop for Custom Post Types and Custom Taxonomies

I am trying to build a template for my own blog with Genesis Framework. The last piece which I have spent biggest portion of time with is sorting out category archive page ( example.com/category/...
1
vote
1answer
102 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
325 views

Ajax Post Filter Tutorial with one taxonomy : How to get multiple taxonomies?

I'm new on this website, I already used a lot of info on Magento stackexchange by the past, but now I'm working on worpdress :) Pretty easier than Magento, but still hards sometimes, maybe because I'...
0
votes
0answers
266 views

Display custom taxonomy child terms with category image on parent term archive

I have a CPT with a custom taxonomy called 'equipment_cat'. I'm currently displaying the subcategories of a category on the category archive using the following code: <?php $term = get_term_by( '...
0
votes
0answers
56 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
335 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
432 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
395 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
491 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
826 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 ...
0
votes
2answers
32 views

get_permalink() of page the enclosing page not posts

I have spent the last hour googling and trying different methods but nothing works the way I want it to. Within the loop of the posts, I need to get the permalink of the main page. Example You ...
0
votes
1answer
166 views

URL Rewrite and Archive Template Files - Post Type vs. Taxonomy

I apologize if this is a difficult question to understand, but really it's a template hierarchy / rewrites question. I have set up a few rewrite rules that are successful, but I'm hoping that I can ...