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
1answer
624 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
16 views

How to remove “Archives” after category name?

There are many similar questions, but none of them have exactly the same issue as I do. Unfortunately the solutions suggested there have not fixed my issue. After selecting a category in my Shop page,...
0
votes
1answer
557 views

How to display custom post types AND regular posts separately on a shared taxonomy archive?

I've looked over numerous questions and answers on problems somewhat related to this but can't seem to find the same situation or solution. I have a custom taxonomy that needs to have an archive page ...
0
votes
1answer
704 views

Post filter Month dropdown at front-end like wordpress backend

when i run the following code. $args = array( 'type' => 'monthly', 'limit' => '', 'format' => 'option', 'before' => '', 'after' =>...
0
votes
1answer
29 views

How to Sort Products by “Featured” first?

I would like the default sort method of my product archives to display all the featured products first, and then display all the other products as normal. I'm not sure if there is a hook for this or ...
2
votes
1answer
613 views

How can I get archives for specific category without category_base in the url?

I'm using this code to get archives for a specific category: function extend_date_archives_add_rewrite_rules($wp_rewrite){ $rules = array(); $structures = array( $wp_rewrite->...
48
votes
9answers
82k views

Remove “Category:”, “Tag:”, “Author:” from the_archive_title

I have the following code in my theme's archive.php: <?php the_archive_title( '<h1 class="page-title">', '</h1>' ); ?> This gives me titles like "Category: Russia", "Tag: America", ...
1
vote
1answer
690 views

Separate DB by yearly archive of Wordpress

I have large DB of blog post I already export it by year and wanted to make archive by year doing it on subdomain, like 2012.mysite.com I stack looking for solution on internet, I wondering if their ...
0
votes
1answer
679 views

How to display total views of all posts of one category?

Is there any way to display total views of all posts of one category? How to show that number on archive page? I have used this code to count views of each post: function getPostViews($postID){ $...
0
votes
1answer
22 views

Yoast SEO settings unavailable in an archive page from wordpress plugin

My Wordpress site has "Seriously Simple Podcasting" plugin installed to serve the podcast feature. This plugin comes with a podcast archive page(click to open) on my site. The page shows correctly ...
0
votes
1answer
984 views

Order archive results by post id in custom taxonomy template

My theme's archive template uses this for the loop, <?php if (have_posts()) : while (have_posts()) : the_post(); ?> Seems to be ordered by post title but I need them ordered by the post id. ...
0
votes
1answer
32 views

Archive Widget - Count only parent posts

I'm currently using a filter applied to the Archive Widget. It's successfully filtering posts from the specific category (26) but now I also want to filter only PARENT posts, in order to count only ...
2
votes
1answer
660 views

Display post links under month in paginated archive

I'd like to create an archive that lists posts under a month header. The months would just be plain text and the post titles, obviously, would link to the posts themselves! So: October 2013 Post ...
0
votes
1answer
27 views

Custom Wordpress theme not displaying posts from category

I am creating a custom Wordpress theme and as far as I can remember Wordpress is supposed to do the heavy lifting for filtering of post types by their category, author, etc. on it's own. This is just ...
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 ...
0
votes
0answers
22 views

Display products with unique attribute value on product archive page woocommerce

We have 40000+ products on our site and have a custom product archive page for manufacturers. Each product per manufacturer has an attribute 'pa_series' that they belong to. Some series have 100's of ...
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 ...
5
votes
1answer
5k views

Pagination throws 404 error on custom taxonomy archive pages

I have created a custom taxonomy for a custom post type called "portfolio" like so: function jvs_portfolio_categories_init() { register_taxonomy( 'project-category', 'portfolio', ...
1
vote
3answers
5k views

Custom post type archive page pagination

I have set up an archive page for my custom post type reference, where I use a query to get all posts of type reference. This works, but when I try to paginate the result, it doesn't work. Right now, ...
3
votes
4answers
8k views

Display posts links from a category group by year

I want to display posts links from a category group by year. Group by year becouse by default wordpress repeat the date for each post. I try use a code but I got all post in current year. How can I do ...
4
votes
4answers
7k views

Get list of years when posts have been published

I want to create a list of posts from a Custom Post Type and add some filters the user can click to filter the list. I added filters for all the categories by using the get_terms() function. Now I ...
0
votes
1answer
35 views

Pagination not working for archive

The query works for the default blog and pages but not for custom post archives. Did I miss something? $paged_bottom = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1; $...
0
votes
1answer
21 views

About title on a page

I would like to know how can I change the title of my page to be just "FinanzasYa" instead of "Category ArchiveFinanzasYa"
1
vote
0answers
13 views

Category archive rewrite rule to include category/subcategory?

I'd like to have my category archive (category.php) accessible using via a url structure like: mysite.com/mycategory/mysubcategory For example, I've got "health" as a category and "smoking" as its ...
1
vote
2answers
1k views

Menu Disappears on Category Pages

I have a site whose navigation disappears on category pages for posts in the ‘post’ post type, but not for posts in any of my custom post types. The ‘post’ post type and post of the custom post types ...
1
vote
1answer
838 views

How to remove category titles?

When I go into certain categories, there is a page title that says "Category: category_name", like this: I would like to remove the "Category" from that title. I've already looked around quite a bit ...
0
votes
2answers
21 views

how to pass args for archive.php query?

I am trying to pass args to archive.php so that I can order the posts, set the number of posts, etc.. but the query is done like this <?php if (have_posts()): ?> <?php while (have_posts())...
1
vote
1answer
836 views

next and previous year month and day for archive page

is there php code for next and previous year,month,day link in archive page i just need something like that <-previous [year] next-> <-previous [month] next-> <-previous [day] next->...
0
votes
1answer
23 views

Creating an archive page or simple template to list all values of a custom field of specific post type listing

I have a custom post type named 'lawyer' and it contains various custom fields. two of the custom fields are 'state' and 'city'. i want to create a archive page or simple page(anyone will do) which ...
0
votes
2answers
449 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 ...
1
vote
1answer
21 views

When i try to open archive pages i get a 404 error

i do not create any new CPT, simply want to open WP standard archive pages like category (eg. https://museosangennaro.it/category/eventi), but when i try to do that i got a 404 error. Can you help me?...
1
vote
2answers
1k views

Archive pagination not working

I am trying to add pagination for my Archive. I want to show 12 posts per page and then show the 'next' / 'previous' buttons. When I manually change the value of the $paged variable, the 1 into a 2 ...
1
vote
1answer
1k views

Show full posts in archive

I have an issue where I need to display the full posts in my archive page. E.G. I have >two posts and I would like to have EACH of them displayed in full in the archive page. Thanks! How would I do ...
0
votes
0answers
18 views

Possible to order archive by selected post IDs, followed by regular order with WP_Query

I can run an SQL query like ORDER BY FIELD( id, 3, 2, 1, 4 ), title and return a list of posts starting with my ids 3,2,1,4 and the continuing with the rest of a query, bringing back all remaining ...
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
2answers
1k views

Custom Category Archive Pages

I have a WP installation with 6 categories and I want 3 of them to use a custom Category Archive Page called "category-special.php" (default page is the "category.php"). I found the code below that ...
0
votes
0answers
23 views

How to make archive of categories subcategories for custom post pages that distinguish between CPT

I have a problem I have 4 different custom post types readymade_public readymade_private collections_public collections_private And the structure is something like this is going to work ...
4
votes
1answer
1k views

How do I display two separate taxonomy archives for two post types that share a single taxonomy?

I have a custom content type, "products", which shares the category taxonomy with posts. We're using posts to discuss and review products. The idea is to have two separate URLs: /discussion/...
1
vote
2answers
1k views

Custom post type / taxonomy rewrite archive page 2 gives 404

I've followed the code based off this and everything is working perfectly -How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-...
0
votes
0answers
31 views

Overriding the template files using a plugin for all themes

I believe these are the common filters to use when overriding a template template_include single_template page_template archive_template The works but it seem that they are theme depended. I am ...
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 (...
0
votes
0answers
12 views

Author archive page by category [duplicate]

I might have a simple question, but couldn't find anything on the web.. I want to create an author archive page by category. For example I have 2 categories: Apple Banana The Author archive page ...
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 ...
0
votes
1answer
395 views

Apply custom taxonomy archive template to children

There is a slight problem that I cannot figure out by myself: I created a custom post type (tours) with custom taxonomy (tour categories). I have created a taxonomy-tour-categories.php to display an ...
0
votes
1answer
38 views

Orderby event date (if it exists) or post date (if it doesn't) - how to reorder posts based on meta value OR date

I need a way to sort the posts on my tag and category archives according to the event date (if it exists) OR post date (if it doesn't). I have a combined archive for events and posts, but want to ...
0
votes
1answer
436 views

Archive links don't work when clicked

I have archive links in my theme that get the archives for a specfic category ('blog) like so: <?php wp_get_archives('cat=6'); ?> When i click on the link for the archives is just loads the ...
0
votes
0answers
15 views

Can I Permalink to all posts older than specific year instead of just posts from specific year?

I need add a link in a menu that points to a page with all posts older than 2016 , by default if i link to myblog.com/2016 it will show the archive for that specific year, but I want a link to show ...
1
vote
1answer
29 views

CPT Archive with core Category

I have a custom post type of news_archive and they are using WordPress Categories. I would like to get some archive pages for these categories with only the CPTs and not core Posts. I managed to come ...
0
votes
1answer
485 views

Link for the page archive for posts, like using custom post types with get_post_type_archive_link

I am trying to get the page to list all my posts (post type = post) in archive. I can do this with custom post types, with get_post_type_archive_link(), but using get_post_type_archive_link('post') ...
0
votes
2answers
182 views

Display future posts in archive

I'm using the following code to display an archive of posts. <?php // Get years that have posts $years = $wpdb->get_results( "SELECT YEAR(post_date) AS year FROM wp_posts WHERE post_type = '...