The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [archives]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
391 views

show image gallery in archives or category page

i want to show image gallery in archives.php or category.php. The featured image and text content is showing but not image gallery. Below is the code inside category.php. I have tested to show one ...
0
votes
1answer
254 views

Prevent Archive URLs

My Wordpress site goes looking for an archive page if I append a year after the URL. For example: http:/mysiteurl.com/my-site/2018. If there are posts from this year, it ends up redirecting to index....
0
votes
1answer
21 views

What's wrong with default posts archive?

This is my template for archive.php template: <?php /* Template Name: Archives */ ?> <?php include 'head.php' ?> <body> <?php include 'header-page.php' ?> <...
-1
votes
1answer
131 views

Custom post type pagination problem - page 1 and 2 show same content

I have a custom post type for frequently asked questions, called Question. Its archive is at /faq/. Page 1 and 2 of the archive currently show the same content. I did some digging and on page 1, ...
1
vote
1answer
251 views

Modify query in pre_get_posts action is messing up my nav menu

I am modifying the query for custom archive pages. I am using the pre_get_posts action. I need to catch some GET variables to modify my query. It is working great on the archive page for one custom ...
0
votes
1answer
21 views

Adding Custom Post Types to category/tag/author archives breaks header content

I'm using the following code in functions.php to add Custom Post Type content to my Category, Tag and Author archives: // Add New Custom Post Types to Archives function rtt_add_cpts_to_archives( $...
2
votes
2answers
760 views

How do I display the “Archives” widget layout (sidebar) in Wordpress by 'year' then by 'months'?

I am using the default widget in my sidebar Archive which currently displays the archive this way: Mar 2018 Feb 2018 Jan 2018 However, I'd like it to display this way: 2018 March February January ...
0
votes
1answer
42 views

What do I need to style for the page after wp_get_archives?

http://summitcoach.web.dmitcapstone.ca/ Just a development server for now, but on the blog page I have links for monthly archives but they go to some page I believe is date.php and I just want the ...
0
votes
0answers
39 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
0answers
18 views

Archive only for /year/month, not terms

I want archive template to be used when I visit /year/month, for example /2018/04. But I don't want the archive template to be used for terms. For example: /tag/news or /countries/sweden. How do I ...
0
votes
1answer
111 views

Customizing the output of the archive and category widget without altering the original behavior of the widget

The current unmodified output looks like this → <div id="archives-4" class="widget widget_archive"> <h2 class="h2b">Archives</h2> <ul> <li><a ...
0
votes
2answers
32 views

How to store archived copies of a WordPress site

Has anyone implemented a site archival capability that saves copies of what an entire wordpress site looked like at various past dates in times? I am looking for any plugins or codex development ...
0
votes
1answer
100 views

Custom category taxonomy - archive page not showing up

I am currently running against a wall while dealing with custom taxonomies. My intent is so use a taxonomy for categories for my custom post type, as to not interfere with the default categories used ...
1
vote
0answers
75 views

How to add Post Format Taxonomy Archive page in the menu?

I have customized the archive template for the post format using the Wordpress template file structure. I have the file: taxonomy-post_format.php which works fine. The page is then accessible ...
0
votes
2answers
25 views

I created a normal page, but the page displays as an archive page

I have created a normal page called "Clients," which should display the logos of my customers. But the page displays as an archive page. The page I'm talking about is http://zedwrites.com/clients/ ...
1
vote
1answer
2k views

Check if current term is a child of another term

I'm attempting to make an archive template that will apply only to subcategories of a particular term. My structure looks something like this: Events (main taxonomy) Tradeshow Show subcat 1 Show ...
0
votes
1answer
30 views

view a list of 3 future post, from the nearest to the most far

for my club's website I have a list of upcoming events. Every event is set with the date it will take place, so I'll have ordered it in archive. I already prepared the site fo view future posts via ...
0
votes
1answer
407 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 ...
1
vote
2answers
160 views

How can i change the output of posts_nav_link();

I would like to change the output of posts_nav_link(); ( Or be pointed in a new direction, that's fine by me ) What i want to do is show < Previous archivepage| Next archivepage > even if ...
0
votes
0answers
879 views

Multiple category archive page

I am trying to create an archive page that shows posts that are in two categories in the same list. The listing should only contain posts that belong to BOTH categories, and not posts belonging to ...
0
votes
1answer
142 views

How can I get all archive-URLs to use the same template?

I notice that mysite/?post_type=my_custom are using index.php while mysite/2018/?post_type=custom are using archive.php. How can I get both of these requests to use the same template? Btw: I'm using ...
0
votes
1answer
49 views

All tag/category/custom taxonomy archives 404

My issue is that mysite.com/tag and mysite.com/tags returns 404 errors. But if I have an eyeteeth tag then mysite.com/tags/eyeteeth returns posts with that tag. This also holds true for categories, ...
0
votes
1answer
22 views

Custom Archive - hide posts until a search is made?

I have a Custom Post Type with an Archive page. I have a filter form on the page so the user can select some options and then find matching results. How can I stop posts being displayed (using the ...
0
votes
1answer
64 views

singular posts using archive styling

I am making a wordpress twenty seventeen child theme. In this theme I have a archive page for all posts with the category "all". Every post has a sub category. On the archive page all posts are showed ...
2
votes
2answers
10k views

404 Error On Category and Tags Pages

Okay So I'm facing a weird problem as i'm receiving 404 errors on blog category and tag pages. I'm using custom theme which includes: tag.php category.php archive.php home.php index.php and 404....
0
votes
0answers
587 views

Featured image on archive page based on post type

Is it possible to use a custom featured image on the archive page? I created a secondary image space using the code below and would like the featured image to pull from that source vs the default '...
1
vote
1answer
231 views

is_main_query() not working for WP REST API

My initial situation is, that I have a custom post type events which are - who would have thought - events. There is a custom UI (backend) where the user can enter multiple dates. Each date is then ...
0
votes
1answer
58 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
0
votes
1answer
71 views

Custom Post Type setup

Desired behavior: Custom Post Type slug: researchers, students, collaborators URL: http://domainexample.com/people/researchers, http://domainexample.com/people/students, http://domainexample.com/...
0
votes
1answer
77 views

The page or ad listing you are trying to reach no longer exists or has expired

I have this URL here https://www.gundogworld.co.uk/judge/. I am wishing for this to be a simple archive page. On this page, it has the body class class="archive post-type-archive post-type-archive-...
0
votes
1answer
28 views

Get posts from category from custom query

Hello I have the following custom wordpress query. This displays all the blog posts just fine. <?php $mymain_query = new WP_Query( array( 'post_type' => 'post','posts_per_page' => '10' ) ); ...
1
vote
1answer
892 views

conditional for sub category on archive page

I'm using conditional statements on my archives pages to display a different content depending of my categories. I have 2 parent categories : author collections each parent categorie has children ...
1
vote
1answer
6k views

Permalinks for WooCommerce Categories and Subcategories

Setup Desired permalink structure (only these structures exist for products) Product 1: /shop/category/subcategory/product1/ Product 2: /shop/category/product2/ Woocommerce Product View Settings ...
0
votes
2answers
182 views

Show Custom Post Type by Author

I would like to set up a function in my functions.php file in a theme so that when a custom-post-type is being viewed, if the user clicks the author name in the post, it only shows CPTs by that author,...
0
votes
1answer
383 views

Archive Page for Multiple Custom Post Types

Is there any action hook or filter or whatever thing to create a archive page which includes multiple custom post types?
1
vote
1answer
68 views

How do I build a post_thumbnail based archive? [closed]

Visually, what I'm looking for is this: So somehow I need to pull the date and each featured image from the years they were posted. I am in the wordpress loop. I've looked around but couldn't find ...
1
vote
2answers
676 views

Changing number of posts per page on CPT-archive.php, have tried 20-30 code chunks so far

I've been trying to change the number of posts that is displayed on my CPT movie-review archive page and I've tried about 20 - 30 different variations (and even a few plugins), but no luck. It is ...
0
votes
1answer
37 views

WordPress archive index page

I am trying to create a custom archive index page for a custom post type. I can't get it to work, I have followed this guide: https://codex.wordpress.org/Creating_an_Archive_Index. Here's what I have ...
1
vote
0answers
63 views

Adding tag's featured image to tag archive

I'm looking for a way to add a featured image to post tags, then display it on that tag's archive page. I currently have the name and description displayed in the sidebar, using a custom sidebar ...
-1
votes
1answer
418 views

WP Archive & Category Pages not filtering

I'm going bananas. I'm creating custom archive pages for a client because whoever originally developed their site didn't create any. I've got the pages there and working like they should, but it's ...
0
votes
1answer
21 views

One of my headings is mysteriously coming up as a link in my CPT Archive

One of my term headings is randomly injected with tags and is coming up as a link in my archive. This behavior can be seen at https://summithmeinc.com/faq/. I've examined my function that replaces ...
1
vote
1answer
33 views

Yearly archive page for future year

There are some posts dated on future year. I would like to show them. What have I done so far: add_filter( 'getarchives_where', 'displayFuturePosts', 10, 2 ); function displayFuturePosts( $text, $r ) ...
1
vote
1answer
160 views

Global variable $post returning incorrect object

In my header.php file, I've been trying to retrieve the slug of the current page, to check it's WooCommerce Products Archive/shop page. I followed this similar question's answer, to no avail; instead ...
0
votes
2answers
65 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
0answers
92 views

How to remove or hide archive page?

How can I remove or hide this type of result after searching on my website This page shows a full page product after searching https://vipfash.com/?s=calvin+klein Is this archive page ? Thanks
0
votes
1answer
458 views

Hierarchical Custom Post Types - Show only parent on tax archive?

I have a cpt of Accommodation Taxonomy of Region Regions are then added like USA, Canada etc Then for the posts: I create a post for a whatever Resort and a child posts of whatever Hotel in that ...
0
votes
1answer
322 views

URL Rewrite and Archive Template Files - Post Type vs. Taxonomy

I apologize if this is a difficult question to understand, but really it's a template hierarchy / rewrites question. I have set up a few rewrite rules that are successful, but I'm hoping that I can ...
0
votes
1answer
59 views

Secondary WP_Query being overriden in archive page

I'm running into a particular problem with an archive page. This particular page is supposed to list all post that belong to a category, but is able to be filtered by a second (custom) taxonomy: i.e.: ...
0
votes
1answer
307 views

How to use index.php as a template for archives?

My archive pages are very much like my home page, except of course for the posts that are loaded. But design-wise, they're practically identical. So I would like to use index.php for both my homepage ...
0
votes
0answers
133 views

How can i remove post type archive URL?

I am trying to disable portfolio archive link form a post type. Beacuse my most important page shares the same url with my archive. And its wont let my actual page link working. How can i fix this? ...