Questions tagged [custom-post-type-archives]

Filter by
Sorted by
Tagged with
0
votes
0answers
11 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
19 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
7 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
15 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
36 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
19 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
23 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
14 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
80 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
14 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
47 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
17 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
18 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
24 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
20 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
9 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
17 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
27 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
0answers
24 views

Use archive template for CPT but not generate urls for posts items

I need to be able to use the archive template for a custom post type but also at the same time prevent URLs from being created for the "posts" that are created, and keep the posts publicly visible. ...
0
votes
1answer
40 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
29 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
15 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
20 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
0answers
17 views

Display custom posts and their childs hierarchicaly

I am working on a support manual. I created a custom post type 'manual' and I want to display an automatic menu of the posts and their childs. It would look like this: Post 1 Post 2 Child post ...
0
votes
1answer
19 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
96 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
193 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
392 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
225 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
46 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
63 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
107 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
108 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
50 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
296 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
253 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
46 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
94 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
195 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
votes
2answers
649 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
1answer
543 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
111 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
719 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
63 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
27 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
168 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 ...

1
2 3 4 5
8