Questions tagged [archives]

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

Filter by
Sorted by
Tagged with
-1
votes
2answers
204 views

Main loop querying current template's info only in custom category archive pages, not my posts

I have a question about reasons why the main query would call the current page's info when using a template file, instead of querying the posts. If I modify the loop by creating a custom query ...
0
votes
1answer
1k views

Custom Post Type Archive Page Filtering

I have a custom post type with a hierarchical custom taxonomy. The taxonomy has several parent terms and each parent term has several child terms. The posts are assigned to one parent and (mostly) one ...
0
votes
2answers
2k views

Archive page doesn't work

I'm trying to build my first custom theme by watching some tutorials and tips. So I have the index, custom pages, and I tried to make the "archive" page and it redirects to my index. The file "...
0
votes
1answer
122 views

Second page of archive is empty

I'm developing my own theme and I included a pagination for the posts. In my database, there are 13 posts and I've set the maximum number of posts displayed on one page to 10, so I should have a ...
1
vote
1answer
189 views

wp_dropdown_categories() scripts working erratically on sidebar

(Posted this on the WordPress forum, but the notification of a reply went to my spam folder, so now it's dropped off the radar.) I have three dropdown menus in the site’s sidebar to create views by ...
1
vote
2answers
2k views

Two loops on archive page

I have 2 loops on the archive page. I want the first loop to display the 2 last posts of the category and the second loop offset 2 last post! <div class="top-posts"> <?php if (...
1
vote
0answers
115 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
620 views

add offset to archive page

Hi how can i add offset into archive page loop? <?php if (have_posts()) : while(have_posts()) : the_post();?> <a href="<?php the_permalink(); ?>" ><?php the_title(); ?></a&...
0
votes
1answer
276 views

Filter Wordpress Archive Widget to exclude posts with specific custom taxonomy term id

I am working with a different variation of code already posted here, which was intended to filter the default 'wordpress archive widget' to only show month results for a specific category. I am ...
0
votes
2answers
2k views

Two differents queries in archive page

(Queries are definitively an infinite source of misunderstanding...) I try to display two types of informations in a tax archive (taxonomy-artiste.php) : The content of a page from a custom post (...
1
vote
1answer
165 views

Root slug of taxonomy returning 404

I have the following code to register a custom post type and taxonomy for it: register_post_type( 'gs_business_listings', array( 'labels' => array( 'name' => __( 'Local ...
0
votes
1answer
59 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 ...
1
vote
4answers
3k views

How to order posts by title after they have already been sorted by category

I'm not an expert at much, so please excuse me if this is an easy question... but it's got my head spinning. I have an archive template (adapted from a standard 'enfold' theme template) which I am ...
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
213 views

In Product Category archives how to show Posts having same/similar prod_cat slug structure?

I will be writing Posts about each of Product's Product Categories (product_cat on products) and I am choosing to group (associate) Posts by the product_cat hierarchical taxonomy. To do this without ...
1
vote
0answers
725 views

Custom archive page for CPT UI

I have created a custom post type using CPT UI plugin, its slug is blog. I created a custom page named archive-blog.php. But WordPress always takes default archive.php. I'm confused what to do. I ...
0
votes
0answers
454 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( '...
0
votes
0answers
29 views

How do I add a count to each month in this archive code?

I use the code below for a page listing months/posts. I want to add a post-count to each month, but have no idea how to do it. I'm also wondering if there's a better way to do what the code does. //...
0
votes
1answer
205 views

Replacing term/taxonomy archive pages with search queries

I've got a site with a very large number of custom taxonomies. The site uses FacetWP to allow uses to drill down through those taxonomies. Instead of sending users to taxonomy-{taxonomy}.php when they ...
1
vote
6answers
2k 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
0answers
238 views

How can I modify wp_get_archives() to not use archive.php template?

If using wp_get_archives() or another query to display a year/month archive, the links for the months requires the archive.php template. Is there a function which can enable a different template to ...
2
votes
1answer
65 views

Slug for standard post post_type

I have a custom post type with an archive page, e.g.: example.com/chronicle. I want to have a page that lists the standard post type, post. This works: example.com/?post_type=post. But, I want to ...
0
votes
1answer
68 views

Want to display my custom date archive to date.php but dont know how

Im having a problem with the custom date archive on how to display it to date.php Here's my code for the custom archive <?php $o_query_result = new WP_Query( array( 'posts_per_page' => -1,...
0
votes
1answer
545 views

display category list year wise in wordpress

I want to display those categories which have post year-wise. Example: 2016 category 1 category 2 category 3 (on click of category 1, post from category 1 + year 2016 will display, ...
0
votes
1answer
46 views

What's the url queryvar for a taxnomy archive?

I know I can query for a term archive like this: index.php?taxonomy_name=term_name But how to have a page with all the terms? So a 'taxonomy home'? How to query it? I mean something like this: ...
0
votes
1answer
65 views

Taxonomy terms can't find posts from archive.php or taxonomy.php

I've displayed all of my custom taxonomy terms and links with get_terms(). When I click on those links then they redirect me to archive.php. But in archive.php, it can't found any posts from those ...
0
votes
2answers
25 views

How to constrain the results to a specific post_type on tag archive page?

I registered three custom post types to a single taxonomy( the default post_tag taxonomy). When I access example.com/tag/foo, I got the posts that have a foo tag, and the posts were taken from all ...
5
votes
1answer
15k views

How to remove “Archive:” label from archive title

I need to remove "Archive:" label from the archive page title. I tried this string without results: <?php the_archive_title('<h2>','</h2>', false);?> The title keeps displaying ...
0
votes
2answers
40 views

How can I modify this to show number of posts-per-month?

I use the code below to produce a list of 'month+posts that month'. What do I need to do to show, alongside each month, the number of posts that month? <?php $previous_year = $year = 0; $...
2
votes
0answers
58 views

URL scheme to retrieve tag archive by ID

You can retrieve a category archive by using a URL scheme like https://example.com/?cat=123. This even works if pretty permalinks are enabled. What is the equivalent query string for tags?
1
vote
2answers
2k views

Change name of custom post type archive

I have a custom post type acme_reviews. I've namespaced it as suggested in tutorials to prevent future conflicts. But I want its archive page to simply be acme.com/reviews, not acme.com/acme_reviews. ...
-1
votes
1answer
428 views

the_excerpt() not working in custom archive

I have made a custom archive template which I want to display all the latest posts. I have managed to get this to work when searching for categories using archive.php fine. However now I have ...
0
votes
0answers
55 views

Page 2 has no posts?

I am having a problem with my blog page archive.php. When I click the next link at the bottom navigation there are no more posts. I have a pretty basic setup which works fine for my search.php, the ...
0
votes
1answer
160 views

How to get the Custom Post Type Archive inside a folder

I have archive-teachers.php which is not yet inside any folder and it was working fine. But when I transfer the archive-teachers.php in the archive folder, it stop working everytime I check the url /...
0
votes
1answer
613 views

Tag archive page not working

I am having a hard time dealing with the tag base page. When I go on a tag archive, the URL is as follows : http://example.com/blog/tag/tag1 But when I go to http://example.com/blog/tag I end up ...
4
votes
1answer
211 views

Give attachments an archive page

I'm trying to override WP's default URL structure for attachments where, if they're attached to a post, the URL is /post-slug/attachment-slug/ and if not it's simply /attachment-slug/. What I'd like ...
0
votes
1answer
88 views

URL to filter posts by post meta similar to shop/?product_cat=“painting”

When on the my woocommerce shop page I can filter all the products by adding ?product_cat="painting" to the URL e.g. localhost.com/shop/?product_cat="painting". Is there a similar there a similar way ...
2
votes
0answers
112 views

Custom query in archive.php with pagination nightmare

I want to run a custom query showing only subcategories of a specific category inside my archive.php with pagination. But, for some reason, it keeps counting (and paginating) by the number of post ...
1
vote
1answer
110 views

How to display custom post in archive section of the wordpress page?

I am using Wordpress Version 4.6.1. I created a Custom Post Type (CPT) named Portfolio. It works fine. But the problem is I want the custom posts to display in the archive('Archives') section of my ...
2
votes
1answer
725 views

Remove Archive Headline and Archive Intro Text fields on category and tag archive pages in WordPress Admin with Genesis framework

I'm currently having a little trouble with removing the Archive Headline and Archive Intro Text fields on the category and tag archive screen in WP Admin. On the category and tag archive pages, ...
1
vote
2answers
161 views

Date Archives' Permalinks under Category folder

I have my WP put under /wp and then my-blog (which is an category, with the slug name 'my-blog') is set to access from (via the plugin 'Top level category') /my-blog/ everything seems fine, except ...
-1
votes
1answer
2k views

Wordpress categories not working throughout site

Lately, I upgraded by Wordpress website to version 4.6.1 and I not sure if that caused issue or something else, but my site is no longer able to filter out posts on the basis of categories. When I ...
0
votes
1answer
281 views

Custom Taxonomy index/archive hierarchy

I have built a custom taxonomy, say, cars. The URL looks like this: http://www.example.com/cars/elantra/ and this is working fine by using the file taxonomy-cars.php as the template. Now, I would ...
0
votes
1answer
295 views

How to get get_categories()'s 'hide_empty' argument to work with global year var in the archive template?

When I use get_categories() in the archive.php file, having hide_empty activated (true|1), and then sending a year value to the file. The hide_empty argument lost it's effect. Categories that doesn't ...
0
votes
1answer
146 views

Show full category tree for a year with all post titles?

Is it possible to print all categories used for a specific year in a hierarchical tree with all the post titles underneath each category title? How?
0
votes
1answer
529 views

Rewrite permalink to include multiple taxonomies

I've seen similar questions posted before but they don't seem to quite fit my problem. I have a post type called product and I have 2 taxonomies, product_cat and location I want archive pages that ...
0
votes
1answer
224 views

Multi level archive

I am trying to pull a list of custom taxonomies from a CT of business-types. I am looping round them like so: <?php $terms = get_terms("business-types"); foreach ( $terms as $term ) { ?> ...
1
vote
1answer
2k views

How to modify archive query with pre_get_posts to append CPTs?

If I use pre_get_posts this way function ef_company_query($query) { if ( !is_admin() && $query->is_main_query() && $query->is_post_type_archive( 'company' ) ) { $query-&...
2
votes
3answers
6k views

How to edit archive page's content inside wordpress dashboard?

So basically, I have a page that is a custom archive showing a list of posts on it. The only issue is, the client wants to be able to edit the actual archive page content itself (image and title), not ...
2
votes
2answers
958 views

Custom Post Type Archive URL takes over page URL

I am having troubles with the archives for a custom post type. I have a WordPress page at /address/ I have created dynamic custom posts that are to appear at /address/post#/ When I activate this ...