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.

-1
votes
0answers
28 views

Sidebar not showing on blog archive page in Avada theme [closed]

I am currently using Avada theme on my WordPress website where I want to show a dynamic sidebar on the blog archive page. Is there anyone who has got the same issue in the past Avada theme? I have ...
0
votes
1answer
24 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
24 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
14 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
37 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
37 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
14 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
30 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
35 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
48 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
21 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
255 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
66 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
44 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
19 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
97 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
264 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
14 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
304 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
16 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
26 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
45 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
27 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
48 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
278 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
32 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
900 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
41 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
51 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
247 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
314 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
137 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
37 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
120 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
85 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
34 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
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
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
366 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
367 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
627 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
74 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
80 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
187 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
75 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
90 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
101 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 ...