Skip to main content

Questions tagged [custom-post-type-archives]

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

Remove date rewrite rule for custom post type archive page

I'm building a website with an archive page where I can filter posts by date (year and month) and by term. I'm using wordpress url params to display filtered posts. The filtered url looks like that : ...
Pof's user avatar
  • 111
0 votes
0 answers
14 views

Category and archive issue

Help, please. I have 4 category pages. When I publish a post on a specific category page it shows on all category pages after creating an archive page. But I want specific archive page for specific ...
Murad's user avatar
  • 1
0 votes
0 answers
26 views

Block Editor - Wordpress 6.1 - CPT Archive Issue - While the title changes in the loop, all records display the same data

I am using the block editor with CPT. I have a loop that iterates though my CPT. The title changes for each record but not the data in the CPT. I am using a shortcode to display my custom post type ...
spreaderman's user avatar
0 votes
0 answers
16 views

Archive page for custom post type shows regular posts, too (by category)

I have a custom post type ("appointments") and a archive page for it ("archive-appointments.php") where I can see of course all the appointments. I have activated the standard ...
herrfischer's user avatar
0 votes
0 answers
19 views

Custom Post Type Pagination Showing 404 On archive pages

Trust you are well. I need your help to fix pagination issues for my custom post type archives. At first, it was my homepage but I managed to fix it with a few function codes which I thought would ...
Gabriel Stephen's user avatar
0 votes
0 answers
12 views

show the entire contents of posts in an archive page as a table

I am in trouble and am asking for your advice on how to proceed. I have created a custom post and inside I have created custom fields. I need to display all the posts as a table (one below the other) ...
bastiag5's user avatar
0 votes
0 answers
16 views

How to create archive child pages with good Yoast SEO meta?

I want to create children pages to some archives on wordpress with Yoast SEO. Today, i have /tags/{tagName} and i want to add sub pages to this archive. The goal is to have: /tags/{tagName} main tag ...
Vexyos's user avatar
  • 1
1 vote
2 answers
51 views

Rewrite taxonomy permalink appended to CPT archive url

I need the following url structures for my Custom Posttype and Custom Taxonomy. Can anyone please help in achieving them? Spent a lot of time but failed. Ton of thanks in advance. Post URL: https://...
TechieBoy's user avatar
0 votes
2 answers
48 views

How to work with URLs where sometimes a post or a subcategory is in the same part of the URL structure

I have a site which has pages that show products (these aren't sold on the site, though, it's just informational). Some categories have subcategories, so the URI for a subcategory archive page looks ...
JoLoCo's user avatar
  • 111
0 votes
2 answers
119 views

Show only taxonomy types terms associated with a custom post type in WordPress PHP

I am trying to display only the taxonomy types terms selected on a custom post type "newsroom". The code below shows all taxonomy types terms for every type of post. Is there a way to show ...
Justin's user avatar
  • 101
0 votes
0 answers
41 views

Cannot create custom post types with a specific name

I am creating custom post types using this code function create_custom_post_type() { register_post_type('courses', array( 'labels' => array( 'name' => __('...
Waleed's user avatar
  • 1
0 votes
0 answers
47 views

Custom Wordpress Archive and query dont filter by categories

I have a problem. I am using Hello Elementor child theme where I made new archive template. Now I added a category to the menu through categories menu item. The problem is that posts are not filtering ...
ERM-AL's user avatar
  • 1
0 votes
1 answer
28 views

Create side bar widget showing list of years as hyperlinks for a custom post type

I have a WP site using Elementor Pro. I have created a Custom Post Type called "Meeting" I have created an archive page for "Meetings" using a Loop Grid To display the post ...
Jasperjon's user avatar
  • 101
0 votes
1 answer
115 views

Custom post type page navigation

I have made a custom post type archive page, but can't make the wordpress pagination work. So far the code I have is the following, but clicking on page navigation just tells me that the page cannot ...
ERM-AL's user avatar
  • 1
0 votes
1 answer
122 views

How to return custom taxonomy term in title for archive?

I am building a site with 2 custom taxonomies (wired-categories, wired-types) assigned to a CPT (wired). I want to show the term in the page title when it is brought up using the taxonomy-wired-...
mtm's user avatar
  • 43
1 vote
1 answer
277 views

Can't add custom post type archive page to menu

I cannot add this custom post type archive page to any menu from the admin. Adding via the front end customizer works fine. Viewing the archive page on the front end also works fine. My custom post ...
Tommizzy's user avatar
0 votes
1 answer
235 views

Dynamic WordPress rewrite rules for multiple custom post types

I'm very new to WordPress development and would like some pointers if this is possible. So I have this rewrite rule for my custom sidebar in functions.php: add_action('init', 'cpt_rewrite'); function ...
yuki-chan's user avatar
0 votes
0 answers
32 views

WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query

I'm having one Custom post type I have added a Sticky Option to that Custom Post Type. When I choose the post as sticky means it's not working for me. I have tried the below code. Please don't add ...
Meivel's user avatar
  • 1
0 votes
1 answer
2k views

Add custom display condition to Elementor Theme Builder for custom taxonomy children, grandchildren, and great-grandchildren

I have a few templates built with Elementor Theme Builder. However, the option to display them on nested archives is quite limited. Here's my case I have a custom taxonomy (tags) called Locations. ...
mardag's user avatar
  • 1
0 votes
1 answer
144 views

Custom archive URL as a subfolder of the custom post type slug

I have a Custom Post Type called Whatever. The slug for this CPT is whatever. By default, I can access the posts archive in the frontend at /whatever and each post at /whatever/post-slug But I would ...
Álvaro Franz's user avatar
0 votes
1 answer
53 views

How to link to an archive-special.php from a custom front-page template?

It seems to me that I am trying to do something really simple : linking to a custom archive page. I'm almost ashamed that I'm struggling with this ! I already created the custom post type (books), ...
Gadget's user avatar
  • 3
0 votes
1 answer
66 views

Pagination not working only on Archive-Name.php using new WP_Query

I created an archive-sticky.php where I added the code below to show all sticky posts in one single page with pagination as there will be 100s of sticky posts in the coming days. Now, this code ...
Elaine Byene's user avatar
0 votes
0 answers
115 views

add_rewrite_rule pagination 404 error on page 4 and above

I am working on a site using Wordpress 6.0.2. Astra is the theme and I am using Elementor Pro. I have lots of custom post types and taxomonies. I am using add_rewrite_rule like this: add_rewrite_rule( ...
Steve Hoare's user avatar
0 votes
0 answers
34 views

Pagination not working on custom post type archive

The pagination is not working. In settings > reading I have set '3' posts for blog pages show at most. On my custom post type archive page, I have 9 posts showing and I have this code. Not sure ...
Carina's user avatar
  • 1
1 vote
1 answer
132 views

Custom Post Types using wrong template (index) instead of archive-{type}.php - previously worked as expected

I have several custom post types on a site where top-level nav items use archive-{post-type}.php templates of the post types. These have recently had a template problem and they now use the index.php ...
Mike's user avatar
  • 23
0 votes
1 answer
86 views

Show custom post type on post category page doesn't work / breaks navigation

I'm making some changes to a site created by someone else. I don't work with WP often so I'm not too familiar with all the hooks, etc. On this site they have normal posts and a custom post type called ...
Mosh's user avatar
  • 101
0 votes
0 answers
261 views

Is possible register two archive pages for single custom post type?

I have a custom post type registered with register_post_type( 'courses', $args ); (like documentation), and I use template archive-courses.php for page www.example.com/courses. I'm using this archive ...
rafaelfndev's user avatar
0 votes
1 answer
182 views

On archive.php show loop for child categories if they exist or posts if they don't, on custom post type

I have a custom post type 'sch_keynote', with custom taxonomy 'sch_keynotegroups'. On the archive page I have managed to create two loops, one for child categories and one for posts. I only want to ...
Ruth's user avatar
  • 11
0 votes
1 answer
343 views

WP_Query - How to get all posts of specific days of week by custom field date?

I have a filter on frontend with days of weeks, and I need show only posts that are published on especific day (or days). The date are on custom field day_of_event (the filter is based on this field, ...
rafaelfndev's user avatar
0 votes
1 answer
286 views

Array_search ignoring the first element [closed]

I made (copy) a function to make the url of the custom post (named investigacion) by year. function tex_get_archives($post_type = 'investigacion') { global $wpdb; $query2 = "...
Daniel Leandro's user avatar
0 votes
0 answers
14 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' ), '...
Avijit Palit's user avatar
0 votes
0 answers
16 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 ...
David Weermeijer's user avatar
0 votes
0 answers
41 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 ...
Alex Abell's user avatar
0 votes
2 answers
30 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 ...
Hasnain Ghias's user avatar
0 votes
1 answer
71 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->...
arrr_matey's user avatar
0 votes
1 answer
299 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 ...
Mathieu Préaud's user avatar
0 votes
1 answer
379 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 ...
bwoogie's user avatar
  • 131
0 votes
1 answer
123 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 ...
Joan Chaparro's user avatar
0 votes
1 answer
598 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 ...
Guillaume Gautier's 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 ...
Tsourou Nas's user avatar
0 votes
1 answer
213 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 ...
Daniel Leandro's user avatar
0 votes
1 answer
185 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/?...
Daniel Leandro's user avatar
0 votes
1 answer
73 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 ...
Nadav's user avatar
  • 101
1 vote
1 answer
2k 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 ...
ProxxiM's user avatar
  • 11
1 vote
0 answers
231 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 ...
Zeeshan Khan's user avatar
0 votes
1 answer
98 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 ...
Mauro's user avatar
  • 83
0 votes
1 answer
161 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=...
Eland's user avatar
  • 11
0 votes
1 answer
155 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 ...
thegirlinthecafe's user avatar
1 vote
1 answer
805 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. ...
Brandon's user avatar
  • 13
1 vote
1 answer
547 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 ...
Siobhan M's user avatar

1
2 3 4 5
9