Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [archive-template]

The tag has no usage guidance.

0
votes
1answer
34 views

Show products as posts on archive page

Usually products on shop pages show up with a single featured image title price and add to cart button like this https://prntscr.com/ngn7o6 , and do not follow the themes original styles and settings ...
0
votes
0answers
21 views

Custom Post Type with categories permalinks

I created custom post type named "Bikes" and four categories (Road, Scooter , Offroad and ATV) and each category have subcategories which I can use to assign custom post entries to. So when I viewed ...
0
votes
0answers
37 views

Why is my site using index.php instead of archive?

Developing my first custom theme and I started out using an individual page-$slug.php to display a list of each custom post. Have since learned that archive.php is better for this purpose (but I just ...
0
votes
1answer
13 views

BuddyPress : how can I call the template Wordpress would have chosen (template hierarchy)?

playing with BuddyPress here ! I made some new user profile pages, and when I display the content, I want to make a new posts query, and display the loop. Thing is, I want to display that loop using ...
1
vote
0answers
17 views

How can I use $wp_query->tax_query as tax_query parameter for a new WP_Query instatiation?

I am trying to use $wp_query->tax_query right out of the box as tax_query parameter, however I cannot work this out. The parameters for my new WP_Query is actually the same as the default query of the ...
0
votes
1answer
26 views

How to list articles by year based on url?

Hie all, I am trying to list posts by year based on the provided url (for example: wordpressite.com/2004 - this should list all articles created in 2004), unfortunately all suggested methods from ...
1
vote
1answer
12 views

Duplicated posts on category page

So, I have archive.php file with this part of code <div class="column is-full is-three-quarters p-small"> <?php while ( have_posts() ) : the_post(); get_template_part(...
0
votes
1answer
53 views

Wordpress override archive page template using a plugin

I am editing the archives template of my wordpress archive pages for specific post types and taxonomies only and I want to package it all in one plugin instead of adding it on my functions folder and ...
-1
votes
1answer
22 views

IF taxonomy archive is hierarchical THEN

I'm trying to put in a conditional in my archive.php that sorts our whether the taxonomy is hierarchical or not. This is what I have so far but it doesn't work. <?php if ( is_taxonomy_hierarchical(...
0
votes
0answers
49 views

Pagination not working past page 3 on archive page of category

I have a custom post type of "show" and within that custom post type I have set up a taxonomy / category called "venue" which has two options "venue-one" and "venue-two" (slugs). On the two archive ...
1
vote
0answers
88 views

Filter posts in category archive page by year using a dropdown

I'm trying to filter my posts by year in different categories by changing the query using a dropdown with this code: <form method="post" action=""> <...
0
votes
2answers
16 views

URL rewrites af

I'm trying to make some pretty URLs that show content from a category page. An example would be this: https://example.com/resources/white-paper (not a real WP page) would show content from https://...
0
votes
0answers
38 views

PageNavi redirects to 404 when used as archive page

I'm using a page as archive for a custom post type called event. register_post_type('event', array( 'labels' => array( 'name' => 'Événements', 'singular_name' => '...
0
votes
1answer
36 views

archive_template override when no posts exist

I have a plugin which contains a single PHP template for both single_template and archive_template for multiple post types. I am loading a client side application in this template, which is why I only ...
1
vote
1answer
100 views

Only one post is showing on category page, why?

My website categories are only showing one recent post, not all. category.php code looks like this: <?php get_header(); /** * The template for displaying Category pages */ quality_breadcrumbs()...
0
votes
0answers
30 views

My archives page won't sort posts by month

I'm trying to make my own theme and I've created an archive template that works fairly well. The template shows all posts, but the problem is that all posts will show if I go to /2018/11/ (posts were ...
0
votes
2answers
387 views

How to Completely Remove Archive Title a.k.a the_archive_title?

I want to remove it COMPLETELY. Not only the label "Archive: " but EVERYTHING. It should not appear. I've been looking for the solution for hours to no avail. Please help. Thank you!
0
votes
1answer
120 views

Change Title Based on Taxonomy Filter in archive-{cpt}.php

So I have page in Custom Post Type RENTAL with following custom taxonomies: Merk -- with terms: Honda, Daihatsu, Toyota, etc Kendaraan -- with parent terms: Mobil, Bus, Motor; & child terms: MPV, ...
0
votes
1answer
51 views

Multiple Custom Post Type in Taxonomy Archive Causing White Screen

So basically I'm trying to add multiple custom post type in my taxonomy archive. Here's my code: <?php $args_trip = array ( 'post_type' => 'trip' , '...
2
votes
1answer
21 views

Last post is not showing up

I'm developing a custom template for a customer that wants in his website the possibility to filter posts by month. After creating an archive.php page and placing the widget "Archives" in my sidebar I ...
0
votes
0answers
110 views

How do I create AMP pages for custom taxonomies?

I have a website that has AMP versions of posts using the amp-wp plugin. A lot of the site's traffic from search comes to custom taxonomy archive pages, such as lists of players on a specific team. ...
0
votes
0answers
299 views

Remove prefix from archive titles for: category, tag, author, date, custom post

I'm at the beginning of my template journey and appreciate this community so much! I'm removing the title prefixes from my archive pages and I've looked at several answers including: Remove "...
0
votes
1answer
17 views

How to get the archive post type/format in the loop?

How do I find out if the archive is a post format, like 'gallery' (www.example.com/type/gallery/)? I can use is_archive() and and is_search() for those. Is there something like is_type() or ...
1
vote
1answer
400 views

get_terms in a taxonomy template

I've two custom taxonomies, and two template archives: taxonomy-brand.php and taxonomy-producer.php If I insert $terms = get_terms('brand'); in the taxonomy-producer.php I can't get terms for the ...
0
votes
1answer
17 views

Create secondary Archive page format?

I'm trying to create a Ajax based category menu that reloads a section of the page with a couple posts from a specific categories based on the category menu item the user clicked. Because my normal ...
0
votes
0answers
29 views

Retrieve list of categories inside date.php template

I've created a date.php template, where the visitor browse the archive of the custom posts grouped by year. I would like to create a slightly helpful structure, giving the possibility to browse the ...
0
votes
0answers
31 views

How to create a completely functioning separate archive for posts from only 1 or 2 specific categories

I can't seem to find a complete way of resolving my issue. I've found parts, but it seems I'm the only one out there who has the issue I do. I have a web working with WP, and recently I've been asked ...
0
votes
2answers
51 views

How to add html code at the bottom of the post in archive page?

I'm looking to add a formatted text at the bottom of each excerpt text when I read an archive page. The code is the same for all the posts. I have found for the category based archive page by ...
0
votes
1answer
321 views

Wordpress subcategories return 404 in custom template

I have a custom Wordpress theme and a main menu on top. This menu has links to different pages, one of them is a link to a Category (archive). It works fine for any first level category, but if I link ...
0
votes
1answer
34 views

I want to display all related posts for a selected tag in WordPress

I want to display all the related posts for a selected tag, my purpose is I display all the tag at my posts, if someone clicks on the tag, then it should be re-direct to my tag template tag.php. But I ...
1
vote
1answer
1k views

Change number of posts to show on Archive page (custom post type)

I've created a custom post type, and I've created an archive page to show them on this page. The number of posts shown by default is 10 but I'd like to reduce the posts' number to 6. I use this ...
0
votes
2answers
34 views

Which Template Page Should I Use?

I have created several custom post types (for example: FAQs, products and case studies) and registered a global custom taxonomy for use across all CPTs. In my case this taxonomy is called audiences. ...
0
votes
1answer
48 views

next and previous category name and link parent only wordpress in archive page

how get next and previous category name and link parent only wordpress in archive page I tried a lot but worked by fetching an ID and adding 1 or losing 1 But this is causing my mistakes
3
votes
1answer
2k views

Loading custom page template via plugin

I am following a rather outdated tutorial on custom post types and the last step is to create a custom page template, where this is intended to show all posts of the custom type in archive listing ...
0
votes
2answers
55 views

show ALL latest posts with archive.php on example.com/latest

I want to make a rewrite-rule for latest posts example.com/latest via rewrite_rules_array-filterhook and display the posts with archive.php. Usually this is what example.com/index.php does, I guess? ...
0
votes
1answer
293 views

Taxonomy template page not working

I have a taxonomy register with name doctor-services and I have a taxonomy template with name taxonomy-doctor-services.php but when I click on taxonomy link it does not display detail of the taxonomy. ...
0
votes
1answer
369 views

Custom post type archive page blank

I created a CPT with slug plist via cutom plugin I made. In my local host the archive work but in live server it return blank page. Here is the 'include' archive page code /** * Add Price List ...
0
votes
2answers
179 views

get first limited words from a custom post in the archive page

I have created custom Post type. Now I am using excerpt to show some limited words in the archive page. but I am showing same posts on the homepage in a content slider (Owl Carousel) which is giving ...
0
votes
0answers
40 views

Override the else part of the index.php loop.

How do you prevent the else statement of the themes index.php from running in a custom archive page template. For example the default theme has: // If no content, include the "No posts found" ...
0
votes
1answer
139 views

Custom Post Archive is not working

I have created WordPress plugin for my custom post. I have tried all solution for archive, which I have found on Youtube and StackExchange but none of those are working. I have refreshed permalink ...
1
vote
1answer
88 views

How To Create A Custom Taxonomy 404 Page

I can't seem to find any documentation on this and Google is only showing results for people who have 404 pages caused by their incorrectly implemented taxonomies. I want to show a custom 404 page ...
2
votes
1answer
2k views

Custom template for archive of a custom taxonomy

I've made a custom taxonomy named activities, containing items named local, member, and national: <?php function add_custom_taxonomies() { register_taxonomy('Activities', 'post', array( ...
2
votes
1answer
5k views

Add custom field to the archive page?

Add fields to archive? I'm using Advanced Custom Fields plugin (but it's not relevant as I can also use native WP fields) and want to add custom field to the custom post archive page. The problem ...
0
votes
1answer
384 views

Display custom post types in wp_list_pages

I have a sidebar that displays parent, child and grand-child pages if they exist, I would like this to work on my custom post types. I have the following custom post types set up: Events, Blog & ...
0
votes
1answer
642 views

Do shortcode in template file

I have a fairly complicated shortcode that works well when put inside the wysiwyg editor. Now I try to include this in a template PHP file using do_shortcode but it doesn't work. My used but not ...
1
vote
1answer
84 views

Custom Taxonomy Archive BUG

I'm hoping that Its just my tired eyes missing something and a fresh pair of eyeballs might catch what I'm missing. I have a custom taxonomy with a slug of 'residential_project_types' that is ...
0
votes
1answer
196 views

Permalinks custom base to redirect to archive.php

I am using a custom post structure, which ads a slug /travel-advice/before the post name. E.g. http://example.com/travel-advice/article-one/ I would like Wordpress to use archive.php whenever I use ...
0
votes
1answer
79 views

How do I apply a wordpress function to something with no ID inside an archive page?

Inside of an archive page I have multiple boxes. In those boxes I want to add a star rating, but I don't want to create a separate post for each of these boxes, I only want to make the boxes manually. ...
1
vote
1answer
97 views

Not able to see CPT archive template

I am not sure what I am missing here , the cpt archive page simply does not want to show. I reset permalinks ( currenlty on default ) , copied archive.php and renamed to archive-articles.php ( tested ...
1
vote
0answers
106 views

How to override p2 breathe theme plugin in content template file?

I'm experimenting with a theme, P2 Breathe, the first o2-enabled theme that adds functionality like front-end posting. One difficulty is that when the plugin is enabled, most of the changes that I ...