Stack Exchange Network

Stack Exchange network consists of 174 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
2answers
12 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
19 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
28 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
23 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
18 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
79 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
35 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
38 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
17 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
13 views

How Can Create Separate Tender Archive Section and Current Tender Section in WordPress

I'm trying to create a WordPress Archive section for Tender, and I'm having a little difficulty with creating an easily accessible archives page. How Can Create separate Tender Archive Section and ...
0
votes
0answers
70 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
211 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
13 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
177 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
15 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
23 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
35 views

Sort by custom field in archive.php with Ajax

how can I sort custom post types by custom field value with ajax. There should be options "Newest" and "Oldest".
0
votes
0answers
24 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
45 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
212 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
29 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 ...
0
votes
1answer
579 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
33 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
36 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
1k 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
44 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
214 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
287 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
95 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
28 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
96 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
79 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 ...
0
votes
0answers
31 views

Permalink to all posts? No matter the reading setting

Currently I am running a function that calls single.php if Settings > Reading is set to 1, and archive.php if set any higher. This also requires a separate blank page/archive template (a duplicate of ...
2
votes
1answer
1k 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
4k 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
341 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
0answers
349 views

Pagination on archive.php

I'm trying to add pagination on archive.php page which in my case is used to display categories, authors and tags pages. When I'm adding the same pagination code, that is used for my front-page.php ...
0
votes
1answer
614 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 ...
0
votes
0answers
68 views

Get all categories on archive based on URL?

I have links to certain archive pages which list posts from two categories using WP urls, for example: http://www.example.com/category/category-a+category-b I am trying to print some plain text ...
1
vote
1answer
79 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
179 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
68 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
78 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
95 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 ...
0
votes
1answer
50 views

How to display archive by selecting year and then selecting month

I'm trying to build my archive page to have a row of years and a row of months. The user would then have to select a year and then select a month and a gallery of posts would be generated. I have an ...
0
votes
1answer
3k views

Custom Post Type Archive template page not found

This following code is custom post type: add_action( 'init', 'wpt_technology_posttype' ); function wpt_technology_posttype() { register_post_type( 'technology', array( 'labels' => ...
0
votes
1answer
29 views

Iterating over custom post type archive returns incorrect first ID

I'm trying to loop over my custom post type 'services' in a custom archive-services.php file. My loop is: <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> ...
0
votes
0answers
351 views

Custom taxonomy return 404

I have created custom taxonomy like so: CODE: /* * Register Product Category Taxonomy */ function product_category_taxonomy() { $labels = array( 'name' => _x( '...
1
vote
5answers
911 views

Increase 10 post limit per page

I am new to wordpress and coding. I created this website: http://www.psychiatryeducationforum.com/ I have six archive pages, and I am posting different posts under each category. I just realized ...
0
votes
3answers
469 views

Which php file lists all the post of a category

In my primary menu, I have added a category "News & Events" and when I click this page, I get all the posts of this category. Which php file I have to edit, in order to change some things that I ...