Questions tagged [custom-post-type-archives]

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

Display average rating in post archive

I have a multi author website where every registered user can submit posts and give star rating for his own custom posts. I am trying to display the average star rating in the current archive query. ...
0
votes
1answer
19 views

Hiding context in archive title

I am trying to remove the context in my archive title As its showing now like this: [Title] - [Context] Can anybody help me out?
0
votes
0answers
18 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. */ ...
1
vote
0answers
17 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 ...
0
votes
2answers
20 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, ...
1
vote
0answers
13 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 ...
0
votes
1answer
28 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/...
0
votes
0answers
8 views

Create a dynamic pricing table using dynamic pricing woocommerce plugin

I am using Dynamic pricing plugin and created an mu-plugin for my following custom code. I want to show the the minimum and maximum pricing details on each single product page. It is working fine but ...
0
votes
1answer
24 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, ...
0
votes
0answers
16 views

why is is_post_type_archive returning false even on post_type archive page

I have created a custom as below in a plugin. $args = array( 'labels' => $labels, 'show_ui' => true, 'show_in_menu' => true, 'show_in_rest' => true, 'public'=>true, 'has_archive' =...
0
votes
0answers
10 views

error 404 on pagination when modifying a new wp_query argument 'post_per_page'

I'm using WP_Query to generate an archive custom posts type. In the settings of wordpress I have set to 12 the number of posts to see per page. But on this particular archive page I want to see 6 ...
0
votes
0answers
28 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, ...
0
votes
0answers
8 views

How to display category names on the Blog Page(Post Page)

Hi everyone I hope your doing well, I'm having trouble on how to display the category names on the Post Page or my Blog Page, could anyone give me an idea on how to display the category names. Here's ...
0
votes
0answers
17 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 ...
0
votes
0answers
39 views

How to modify a query in functions.php to involve both post_title and fields from wp_postmeta?

On my Fusion Builder powered WP website I have created a CPT called movies. The title of each post (i.e. each movie) has a post_title property which is located in wp_posts table, other custom ...
0
votes
0answers
67 views

Multiple archive pages for a single Custom Post Type

An existing project has a Custom Post Type named Restaurants. Up until now, we were showing restaurants located in one only country (spain). So I have my restaurants archive page loading all the ...
0
votes
1answer
24 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 ...
0
votes
0answers
16 views

post count not reflecting pre_get_posts action

please can someone help me out! I'm using a plugin to create a widget for a custom post type archive which is showing in a sidebar. I then added a function to further filter the results using ...
1
vote
0answers
109 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 ...
0
votes
0answers
15 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 ...
0
votes
0answers
55 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....
0
votes
1answer
18 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 ...
0
votes
0answers
20 views

pretty urls for categories instead of query string along with pretty pagination

I am trying to add a pretty urls instead of query string like customers/reviews/xyz here reviews is a custom post type and xyz is category customers/reviews gives all reviews and customers/reviews/...
0
votes
1answer
26 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 ...
0
votes
1answer
34 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 ...
0
votes
0answers
14 views

Is there a way to create archive pages or video galleries by using external playlist URL

Hello I want to know if I can make some kind of archive page that auto upload results feeding from a external url. My goal is to make this using a video playlist so each link in the page should open ...
0
votes
0answers
21 views

WordPress Page hierarchy ( parent is singular of custom post types slug ) is returning not found

I have a custom post type called CASINOS with slugs is casinos wich has _archive set to false and I have a page called Casino with slug casino ( singular) The problem is when creating a child with a ...
1
vote
0answers
30 views

Display custom post type category, while in a CPT category, then the posts beneath

I'm trying to list custom post type categories, then the posts beneath them that are contained in that category. This will be on a parent category page. It should look like: To-Go (Parent Category ...
0
votes
2answers
22 views

Not able to see archive page of custom posts

I am using Wordpress 5.4. I created a CPT using the code below: $args = array( 'labels' => $labels, 'description' => 'Some description', 'public' => true, '...
0
votes
1answer
41 views

pagination problem listing custom post types of taxonomy in wordpress

I am trying to list a set of products which match a taxonomy terms. The list of the products is fine, but I can't figure out the pagination of my custom posts. I have been looking for information in ...
0
votes
0answers
30 views

Custom Post type page content (archive page)

I have website with multiple Custom post types and I need to create an Archive page for each post type that also has extra content (short description and the like). The way I would about this would be ...
0
votes
0answers
16 views

Pagination Not Working With Custom Post Type Category

I can't get pagination to work with this custom post type category archive. The custom post type is called 'blog'. <h2 class="category-h2">Blogs Category: <?php single_cat_title(); ?></...
1
vote
1answer
26 views

Automatically Give All Custom Post Types a Pre-Set Category [duplicate]

I am building a site with 5 different custom post types on and would like to create an archive page that pulls in all of these posts and then sorts them by the standard WP date order. Instead of ...
0
votes
1answer
20 views

I want to create a custom taxonomy page showing a list of subcategories

hoping one of you wizards can help me with this one. I'm fairly new to this. Here's the situation - I have a custom post type called 'Videos' where I set up a Custom Taxonomy called 'Country List'. I ...
0
votes
1answer
110 views

Group custom post type posts by month

I need help grouping posts by month+year (sorted by the date the posts were published a), when in result I'd have something like this: November 2019 Event 1 Event 2 December 2019 Event 3 Event 4 ...
0
votes
1answer
225 views

ACF Pro Accessing fields on a Custom Post Type

I'm an intermediate PHP user and I've been able to do some great things on my own with ACF but I could use some help. Instead of using an options page, I would like to add some fields to the Custom ...
1
vote
1answer
500 views

Limit the Title Length on Custom Post Type Archive Page to a Set Number of Characters

I have a custom post type 'news' and would like to limit the title character length to 42 characters on the custom post type archive page for 'news' The following code is how the title is displayed ...
0
votes
1answer
278 views

ACF for custom post type archive pages: which hook to use?

I'm trying to register ACF options pages for each custom post type defined in the theme: $post_types = get_post_types( array( 'public' => true, '_builtin' => false ), ...
0
votes
0answers
75 views

Static Front Page not working for custom theme

I'm building a custom theme for a client... I am trying to set up a static front page, but no matter what page I select it falls back to a custom post type archive page. I have confirmed that I can ...
0
votes
1answer
47 views

Pagination not working for archive

The query works for the default blog and pages but not for custom post archives. Did I miss something? $paged_bottom = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1; $...
0
votes
1answer
91 views

Creating an archive page or simple template to list all values of a custom field of specific post type listing

I have a custom post type named 'lawyer' and it contains various custom fields. two of the custom fields are 'state' and 'city'. i want to create a archive page or simple page(anyone will do) which ...
0
votes
0answers
133 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
135 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
57 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
380 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
337 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
1answer
23 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
55 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
2answers
133 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
3answers
235 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 ...

1
2 3 4 5
8