Questions tagged [custom-post-type-archives]

Filter by
Sorted by
Tagged with
0
votes
0answers
15 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
0
votes
1answer
28 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=...
0
votes
1answer
46 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 ...
1
vote
1answer
47 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. ...
0
votes
0answers
12 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 ...
1
vote
1answer
32 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 ...
0
votes
1answer
45 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, ...
0
votes
1answer
70 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" ...
0
votes
1answer
32 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:...
1
vote
0answers
31 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: ...
0
votes
0answers
21 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' ); ...
1
vote
0answers
27 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://...
0
votes
0answers
19 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
37 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
23 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
50 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
30 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
14 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
28 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
36 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
29 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
10 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
18 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
188 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
26 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
20 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
128 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
16 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
64 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
1answer
28 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
68 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
28 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
35 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
23 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
48 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
31 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
32 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
145 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
279 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
642 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
368 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
97 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
48 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
144 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
148 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 ...

1
2 3 4 5
9