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 [archives]

A page showing more than one post in the main loop.

0
votes
2answers
24 views

Tell wordpress to show a single page instead of an archive page

my wordpress site urls like this: https://example.com/?pid=a125a5&lang=en and query of my archive page like this: <?php $the_slug = get_query_var('pid'); if ($the_slug){ if ( $post = ...
0
votes
1answer
13 views

Display post count on archive page in reverse order

I'm displaying some posts and I want each of them to display a post number. The first post being number 1, the most recent post being 10 (let's say there's 10 posts.) I'm currently using <?php ...
0
votes
0answers
18 views

WooCommerce product archive url without value / all values

Is is possible to list all products by a certain attribute without specifying the term value ? Right now, accessing site.com/attribute_name/term_value/ returns as expected. Accessing site.com/...
0
votes
0answers
30 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
0answers
16 views

Permalink like example.com/taxonomy/post_type/postname

I would like permalink structures like this: example.com/%post_tag%/post_type/postname for posts example.com/%post_tag%/post_type for archive page of post_tag filtered with custom post type archive ...
0
votes
0answers
23 views

blog archives and search issue

this is my first blog, I have no experience so this is conglomerate of code that I found on stackoverflow etc. I want to ask is everything correct? archives and search results are wrong. any ideas ...
3
votes
1answer
26 views

How to show more posts on an archive page?

I'd like to show more posts on my custom archive page, but can't seem to figure out the right way to do it. Currently it displays 10, which is the number set in WP Settings and the number I'd like on ...
0
votes
1answer
37 views

How to get links to previous and next archive page based on tag

I use Extra theme from Elegant themes. One of specific functions of this theme is category layout builder, which creates archives posts based on taxonomy. I have created such layout pages based on ...
0
votes
2answers
19 views

Archive for custom taxonomy

I have a custom post type movies that I have defined in function.php function create_post_type() { register_post_type( 'movies', array( 'supports' => array('title', 'editor' , 'excerpt' , '...
1
vote
0answers
27 views

Archiving by academic year instead of calendar year

I am building a website for a school where teachers can add posts for classwork. The posts are categorised by the class name (e.g Year 1, Year 2, etc). The academic year goes from September to July. I ...
1
vote
2answers
107 views

Custom post type archive sorted and grouped by date in post meta field

I am trying to build an Custom Post Type for showing information about events. The Custom Post Type has name 'Event', with the following meta fields: event_startdate (date in format YYYY-MM-DD) ...
0
votes
1answer
24 views

Archieve.php not loading for custom post type

I have a post with a category of blog . So i came across with this archieve.php , whereby we can edit the layout and content of a custom post type. From what I understand archieve.php contains the ...
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
34 views

Custom Post Type archive page listing a 404 or single post

I want to preface this by saying we HAVE tried saving and re-saving the permalinks structure. We are developing a custom theme and have a few custom post types in our theme. An example of one of them ...
0
votes
1answer
16 views

How to hide custom taxonomy archives same way as hiding custom post types?

I'm trying to make it so my custom taxonomy terms don't have archive pages. I achieved something similar for a custom post type using "publicly_queryable' => false". I tried this from the docs inside ...
0
votes
0answers
76 views

Show full post in category archive pages in twenty-nineteen theme

I am using twenty nineteen theme. It shows only the excerpt in the category archive page. I would like to show the full post. I created a child theme and copied the file archive.php to the child ...
0
votes
1answer
40 views

Woocommerce product not appearing in category list page when created programatically [closed]

I am creating a plugin that will filter the products from API to our WordPress site. I did successfully created the product and automatically publish it with category and subcategory in it. http://...
0
votes
0answers
33 views

Display Category yearly wise in wp

How to list the categories yearly wise in template and the taxonomy page of the category should list the posts of the selected year. 2016 2017 2018 Category 1 ...
0
votes
1answer
25 views

Archive: Lists itself

So I have created an archive.php, set everything up, and my archive page works fine. Now I was wondering, of how I should prevent the archive page from listing itself. When accessing the page called ...
0
votes
0answers
16 views

Taxonomy Brand Archive with Product Categories Integration

The following code is inserted in a the taxonomy brand page and it shows all product_cats for a specific brand. <?php $argsproduct = array( 'post_type' => '...
0
votes
1answer
14 views

Where is the content that is outputted by get_the_archive_description()?

I need an intro text to a custom post type archive, so I want to use get_the_archive_description(). Thing is, I can't figure out where in the admin is the text that is gonna be outputted by this ...
0
votes
0answers
19 views

How Can I add show_post_count in get_archives_link?

How can I show archive's post count in an customized html output for archive? //Change Archive List HTML function change_archives_output($link_html, $url, $text, $format, $before, $after) { if ('...
0
votes
0answers
12 views

How to remove Archive title from category using a lune theme? [duplicate]

i am trying to remove the "Archives Category Archive for: "Montage d’un conduit inox" and put only the name of my category instead. I am using a category in my menu and i am using a lune theme. Can ...
0
votes
0answers
30 views

How to add excerpt and read more button to category archive page

I am finding it hard to add excerpt and read more button to my category archive page
0
votes
0answers
24 views

google index an Post type page I do not want

I created a Custom Post type for my client's site, and everything works fine. but, I found that google index an archive page that I do not want. here is the code of my Post Type: $...
0
votes
1answer
24 views

How to prevent archiving and search engine caching in a free Wordpress blog?

I don't like to have my free Wordpress blog cached by search engines or even worse, archived by the known archiving websites and services like The Wayback Machine. How can I do that?
0
votes
0answers
23 views

Custom archive paged head title

My website is in hebrew and when im in a paged archive the title is "archive title" page 2 of 4. How can i add the title only in archives that are in a page 2 or higher? I am using Yoast SEO. And its ...
0
votes
0answers
17 views

Need a Plugin for Sorting Specific Category Posts within a Static Page

I am NOT a strong PHP coder and mainly create sites using plugins and custom CSS which I am strong at. I have a page listing posts from a specific category. The page is built using Elementor Page ...
0
votes
1answer
41 views

multiple custom post type on category page

Is it possible to have multiple custom post types appear on a category page? For example, I have a category Animals and I can assign it to both these custom post types: dog, cat Both cpts use a ...
0
votes
0answers
31 views

Turning archive templates to a page template maintaining the slug

I used to have an archive-rooms.php (as page-rooms.php) template to list them all This had few problems: No title page No way to synch menu item with title so: 1) I duplicated the archive-...
0
votes
0answers
25 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
329 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
97 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
25 views

Display all posts from specific category

Problem: I'm trying to display all posts from a specific category named 'Culture' (slug: culture) in my website. However, I'm always getting an empty field. My Attempt: I've tried to use the same ...
1
vote
1answer
62 views

Wordpress showing archive.php instead page

I have a problem with same name (slug) for category and page and wordpress is showing archive.php instead page custom template. Permalinks settings for category is . and i want to stay this way but ...
0
votes
0answers
19 views

Custom post type categories giving 404

I have a custom post type called "News" which looks like this: /** * Register "News" custom post type */ function news_custom_post_type() { $labels = array( 'name' =&...
0
votes
1answer
223 views

Removing CPT slug from URL results in 404 error for archive page

I have created a CPT with rewrite rules as follows: "rewrite" => array( "slug" => "/", "with_front" => false ), In the functions.php, I have added the following code: function ...
0
votes
2answers
262 views

Adding pagination to a custom archive template

I'm trying to add pagination to my archive template. If I use the same code as on my main blog template it doesn't filter results based on the tag in the URL, instead it simply shows all posts. ...
1
vote
2answers
118 views

Display posts from #6 to #20 on archive page

My client shows his 5 most recent posts (excerpts) on the homepage followed by a "read more" link. On archive page he does not want to display the 5 most recent post again but posts from #6 to #20. ...
0
votes
1answer
58 views

Archive URL returns 404 error for Custom Post Type

Having issues with a custom post type that returns a 404 error when I visit the archive page. get_post_type_archive_link() for the post type (called project_profiles) returns the URL mysite.com/...
0
votes
1answer
23 views

Changing author links on homepage to buddypress profiles - without affecting ability to link to author archive throughout the site

I've set all author links to head to the author's buddypress profile rather than the author archive page. I've done this through my child theme's function.php file. *add_filter( 'author_link', '...
0
votes
0answers
13 views

Order by 3 custom fields in archive Woocomerce list

I'm trying to order the products in woocomerce archives pages by 3 custom fieds, my code is: add_action( 'woocommerce_product_query', 'imcar_custom_product_query' ); function ...
0
votes
0answers
184 views

How to customize template for custom post type archive page using genesis

I have created a custom post type, and an archive template called archive-casestudy.php which simply contains: <?php genesis(); ?> Presently when I load this archive page I see the title of ...
0
votes
1answer
54 views

Display archives based in post_format

I'm working in a project that needs to use post_formats. First of all, is there any way of create a new post format? The only thing I've found was to overwrite an existing one. In addition, they're ...
0
votes
2answers
75 views

Meta Box: display single image on an archive-template

I'm trying to get the url of an image from a MetaBox (plugin) filed on an archive-page. <?php if ( rwmb_meta( 'field-id' ) ) { // Get images $img_srcset_large = ...
0
votes
0answers
17 views

Show archives as a drop-down in the main navigation menu

I am using the Independent Publisher: 2 theme. It looks like this in action. I would like to be able to access my blog archives by clicking on the navigation menu, as a drop-down. In other words, I ...
0
votes
1answer
33 views

Order archive custom posts by taxonomy term [duplicate]

I cant change the way things are, so I cant use custom meta... I have terms that are years and I have to display the archive in order (newest to oldest-in terms, not published date) For example the ...
0
votes
2answers
38 views

Custom Post type & Taxonomy 404

I've created a custom post type & taxonomy, however when I go to my taxonomy page it throws a 404 error and I can't understand why. // Register Custom Post Type function portfolio_post_type() { ...
0
votes
1answer
30 views

What php gets called for home_url/somepage URL?

This is going to sound quite stupid for most experts but for a beginner it's not clear what .php code gets called when visiting a home_url/year/month URL. For example, domain.com/2018/05 shows all ...
1
vote
1answer
35 views

Filter post by clickable year [duplicate]

How can I get all the year of posts in archive.php and put it on the list? 2016 | 2017 | 2018 And after clicking any year, It will show the posts of the selected year www.example.com/post_type/2018....