2022 Developer Survey is open! Take survey.

Questions tagged [custom-post-type-archives]

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

CPT archive with WP native/core tax/categories

So for some reason this is oddly difficult. I need to have a CPT which uses the core categories between the CPT reviews and core posts as news. I've tried getting the CPT archives as just URL which is ...
user avatar
  • 67
0 votes
0 answers
14 views

How to set a 'page' as parent of a custom post type?

For various reasons, I would like to use a 'page' in preference to an archive page for one of our custom post types and have this be reflected in the permalink structure. I am struggling to find out ...
user avatar
0 votes
0 answers
9 views

Custom post archive page not opening 404 page

I have custom post type like this register_post_type( 'workforce_archive', array( 'labels' => array( 'name' => __( 'Workforce Archives' ), '...
user avatar
0 votes
0 answers
14 views

is there a way of getting term children that only shows those from two taxonomies

hi so I am trying to list the terms ( product categories ) but only those that exist in another custom taxonomy, say 'workplaces'. I have the below code that does this, but without taking into account ...
user avatar
  • 16
0 votes
0 answers
8 views

wp-query and wp_get_post_terms on custom taxonomy archive page

hi so I am just wondering how I can increment the pagination of a page based upon the terms found with wp_get_post_terms() rather than the post count for the page. this is the process i have: custom ...
user avatar
  • 16
0 votes
0 answers
8 views

Display All Courses in Course Archive Page

I am Developing Course Management Website. I have main post type Course, under Course I have different taxonomies like Institution, Location, Course Type and etc.. The problem is, if one Course ...
user avatar
0 votes
0 answers
12 views

Archive page of CPT's custom Taxonomy

I have a Custom Post Type: "Sponsors" Sponsors have a Custom Taxonomy: "Sponsor Ranks" Sponsor Ranks are divided like Platinum Sponsors - Gold Sponsors - Silver Sponsors and so on ...
user avatar
0 votes
0 answers
15 views

How can I combine Wordpress default Tags and bbPress tags into one archive page?

I'm trying to figure out how to combine two taxonomies? I've got three things going on: Tags from Buddyboss's Forums (Buddypress/bbpress) Tags from The Events Calendar Pro Tags from Wordpress's ...
user avatar
0 votes
2 answers
25 views

Getting Same Description in All the Custom Taxonomy Posts

I have developed a custom taxonomy post type. I have displayed categories & inside categories posts/(products). I am getting the Post title & Image as they should be (which I add), but the ...
user avatar
0 votes
0 answers
18 views

Invalid content when I try to import custom post type from the old template wordpress

I changed my wordpress theme on December 2021, and Im still trying to import the custom post types of my old theme to my new one.Ive tried like 5 times, the only thing that is importing is the ...
user avatar
0 votes
1 answer
47 views

Archive page for Wordpress Custom Post Type doesn't show pagination from paginate_links()

I have a custom post type with courses-events as the slug. In functions.php, I have: add_action( 'pre_get_posts', 'custom_archive_items' ); function custom_archive_items( $query ) { if ($query->...
user avatar
0 votes
1 answer
34 views

Detect Ajax call inside pre_get_posts function

In the front end, I have a custom post type archive page with an AJAX Load More button. The loop of the archive page is ordered by date and ASC. I use the same args for the AJAX loop inside a ...
user avatar
0 votes
1 answer
21 views

2 Custom Post Types In 1 Archive Page?

I have 2 custom post types (announcements and news) and I want to have their own archive pages (which I have, and they're working) and an archive page that shows both posts types ordered by date. How ...
user avatar
  • 131
0 votes
1 answer
75 views

Main query disturb pre_get_post by category query

I've an archive page with custom post sorted by a custom field. I have two buttons that apply a filter by custom category. The result is not as desired. The correct number of results comes out, but ...
user avatar
0 votes
0 answers
20 views

Custom post type archive URLs with a single taxonomy

I have two custom post types: Products Reviews These post types, share a single taxonomy: Category I want to make sure that the archive URLs become something like this: /reviews/category/term /...
user avatar
  • 1
0 votes
1 answer
58 views

Polylang : Display term archive even if no posts

I use ACF to customize taxonomy term archives pages which are in fact Team member pages. Pages are translated with the help of Polylang. Problem is : If the member has no related posts, I can access ...
user avatar
1 vote
0 answers
22 views

Get number of post who belongs in two taxonomies!

I need a way to figure this in the image! I have two taxonomies (Band, City) in my custom post type and I need in my custom archive page to have all the posts who belong in each taxonomy! Is there a ...
user avatar
0 votes
1 answer
38 views

What's the name of the custom post type yearly archive template?

I know there's a name for every kind of template. archive-CPT.php, or single-CPT even taxonomies taxonomy-taxonomyname.php but, what's the name I should use for the template that have my yearly ...
user avatar
0 votes
1 answer
49 views

Create an array with all the links of the years' archive (of a custom post type)

I have a custom post type called "papers" and I need to create an array with all the archive links per year that exists. Something like: array ( [0]=> 'http://www.example.com/2021/?...
user avatar
0 votes
1 answer
59 views

Custom Permalinks For CPT and pages with parent. Advanced Wordpress

So, I've created a CPT - Community Post: https://pastebin.com/9XSrvZAr For this CPT I've created two custom taxonomies: https://pastebin.com/fNhfpiM6 community_post_domain community_post_type My goal ...
user avatar
  • 101
1 vote
1 answer
225 views

Custom post type: Disable single page, but keep archive

I am looking for the best way to create custom post-types which are only used as an archive for their posts. As an example I want an archive showing all employees of a company, but I don't want the ...
user avatar
  • 11
1 vote
0 answers
59 views

WordPress post_where & posts_join not working only for custom post type

I have a custom WordPress plugin built for booking courses etc. My custom plugin has some new tables in which custom data like slot date, time etc are stored. I am trying to modify archive query for ...
user avatar
0 votes
1 answer
57 views

How to integrate single and archive templates for custom post type in any Wordpress theme

I am working on my new WP Plugin for advanced control of custom post types and meta boxes. Actually, I am working on an HTML Builder for the full customization of single and archive templates for the ...
user avatar
  • 63
0 votes
0 answers
45 views

add custom button in archive page after every post excerpt?

I want to add custom button in archive page .add custom button in archive page after every post excerpt Reference https://ibb.co/h15xHZ8
user avatar
0 votes
1 answer
88 views

Why isn't the 'no results' being shown when a query returns no results?

I've been following this tutorial for a simple AJAX filter search within wordpress: https://itsmereal.com/simple-ajax-filter-search-for-wordpress/?unapproved=3915&moderation-hash=...
user avatar
  • 11
0 votes
1 answer
71 views

Permalink problems with custom post type and custom taxonomy

Question 1 Permalink structure I trying to implement the right url/permalink structure for my site, but I can't get it to work. I have the following setup: Custom post type: training ...
user avatar
1 vote
1 answer
116 views

How do I exclude posts from custom taxonomy from a custom post type archive?

I am trying to exclude posts from a custom taxonomy from displaying on a specific custom post type archive. How can I accomplish that? Today, I do this on a per post basis which is not practical. ...
user avatar
  • 13
0 votes
0 answers
61 views

Text input field for filtering custom post type in custom archive page

I made a glossary custom archive for a custom post type 'words' and I'm trying to add a search bar/text input field that will filter the words and only show the ones that have the ...
user avatar
  • 1
1 vote
1 answer
44 views

Custom Taxonomy template is not recognised

I have created a custom post type (products), and at the moment I have 2 custom taxonomies (lips and eyes). I can get the archive to show up for 'products', and I can get to the URL for the archive ...
user avatar
0 votes
1 answer
49 views

Add archive/category results to single post page

Have posts, want related categories to display under them. Post example: Artist name. Category example: posts with the Artist name. My current version, arrived at based on a comment from @birgire, ...
user avatar
  • 17
0 votes
1 answer
92 views

Different number posts per page based on custom post type term id

Trying to cobble together a function from various suggestions that sets the number of posts per page based on the custom post type category in question. For instance, an "Alphabetical" ...
user avatar
  • 17
0 votes
1 answer
52 views

sort CPT on Custom Taxonomy Archive page

I have created a custom post type called "al_product" and attached to it a custom taxonomy called "product_category". In my archive-product_category.php I have this (relevant) code:...
user avatar
  • 5,257
2 votes
0 answers
59 views

How do I get WordPress URL rewrites into Sitemap?

Consider the two following custom post types: Museums Bakeries With one shared taxonomy: Region I'm using rewrite rules to improve the URL structure, so I can serve pages to visitors such as: ...
user avatar
  • 21
0 votes
0 answers
102 views

Add content in cpt archive page

I am trying to add some custom content hooked into custom post type archive page but I can't. I have already achieved it in single page with: add_filter( 'the_content', 'yourprefix_add_to_content' ); ...
user avatar
1 vote
0 answers
36 views

Custom Post Type Yearly Archive Permalinks

I'm struggling a bit with the permalinks on yearly archives for a custom post type. I'm using wp_get_archives to get a list of the yearly archives but the url for these comes out as follows: http://...
user avatar
  • 363
0 votes
0 answers
22 views

Does this archive template part look like its making too many calls to the db?

I set up a custom post type & taxonomy and registered it as a plugin. Then i'm referencing it from an archive template like this: <?php /* This loop is used in the Archive [.php] template. */ ...
user avatar
  • 215
1 vote
0 answers
199 views

How to get all product attributes for filters in WooCommerce?

I am trying to figure out how WooCommerce decides which product attribute filters to bring. Because it does not only bring filterable attributes of the products in first page of an archive, but also ...
user avatar
  • 89
0 votes
2 answers
49 views

How to add specific terms in a custom post type?

I am creating a dedicated WordPress ecommerce website without using WooCommerce for myself. I created the custom post type called 'products' but now I am stuck on how to add specific terms like SKU, ...
user avatar
1 vote
0 answers
133 views

CPT UI - elementor tags archive template not working

I've faced a situation with CPT UI and Elementor. I've created a CPT with categories and tags. But, when I tried to create a template for those tags (to dynamically redirect to my CPT posts associated ...
user avatar
0 votes
1 answer
44 views

How to change URL for custom post type archive?

I'm trying to change the URL for my custom post type archive. At the moment, the archive of my post type has the URL https://example.com/myposttype/ I want to change that to https://example.com/xyz/...
user avatar
0 votes
1 answer
32 views

Finding the CPT archive template source

I've created a CPT named kindergarten by a plugin ; I was able to see the archive page of this custom post type with its posts; When I was using Elementor for changing the template of this post type, ...
user avatar
0 votes
0 answers
33 views

Displaying all posts by category and showing content on click

I am building a WordPress site for a composer who has written over 200 pieces of music. Each is a custom post (work), organised by a hierarchical custom taxonomy/category (type – being orchestral, ...
user avatar
  • 29
0 votes
0 answers
36 views

Archive Meta on Product Post Type

I am using a filtered search to provide end user the ability to browse either live/published Woocommerce product listings or archived product listings; however, I am running into an issue where I am ...
user avatar
  • 1
0 votes
1 answer
35 views

Redirect logged in users from a custom post type archive page if they don't have a specific role

I have a Custom Post Type named flashcard and post of that type are listed by an archive-flashcard.php template. The bellow function force flashcard posts to be listed only for posts authors (they ...
user avatar
  • 1,081
1 vote
0 answers
172 views

Use Custom Post Type archive page for the taxonomies term archive page

In my wordpress theme I created a new custom post type 'books' with 2 taxonomies ('series', 'genres'). when I visit the archive of the cpt 'books' (site.com/books), I list all the books. I added a ...
user avatar
  • 11
0 votes
0 answers
21 views

Custom post type author issues

I've created a CPT called 'artigos' (articles), which supports title, editor, thumbnail and author. I can see and choose the author of the post, but in the users screen, the number of posts assigned ...
user avatar
0 votes
0 answers
76 views

What code do I "comment out" to remove the loop from this Custom Taxonomy

In my theme (which is the amazing GeneratePress) there is, of course, an archive.php file. I have custom taxonomy which (to save a long and boring discussion) needs to have its' loop removed or hidden....
user avatar
  • 985
0 votes
1 answer
21 views

Why is my archive page looping through all but one post?

I've created an archive page for my custom posts, it loops through every one except the first. There is 11 posts overall and I only get 10 on the archive page. Here is my archive template: <div ...
user avatar
0 votes
1 answer
32 views

Custom Post Type / Taxonomy not displaying archive

I am trying to use the Atreas Theme: https://wordpress.org/themes/antreas/ This is the site I am working on: https://sandbox.paediatricphysiotherapyassociates.com/ All I want is an archive page for ...
user avatar
0 votes
1 answer
135 views

Reverse order of posts in a certain taxonomy archive?

I have a custom post type message which has a custom taxonomy called series. Is there a way to reverse the date order of the posts in just that archive (oldest first)? I want to continue to show ...
user avatar

1
2 3 4 5
9