Questions tagged [archives]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

What is the best approach to having WordPress with two blog archives?

I'm trying to figure out how to have two blog archives on one instance of WP. I have a single WP instance with a blog. I have a custom page template for the archive index of posts. I exclude a ...
0
votes
3answers
34 views

WP Query for all posts

I have page-property.php in the loop folder with this code. And I see only 8 posts (Custom Post type), but I want to see all of them with pagination, what's wrong? <?php $view = 'archive'; ...
0
votes
0answers
15 views

How to remove year page from wordpress

I have tried to add page with permalink 2020 but unfortunately it is taken by some build in wordpress year archive page. How can I reclaim such permalink? : http://localhost/wp/2020/ I have used ...
0
votes
0answers
10 views

Redirect to custom post if custom archive page has just one result?

So i have made a Custom Post Type called cars and 4 taxonomies that i use to make/edit the cars pages. I have a search&filter pro plug-in to help me sort my pages by the 4 taxonomies assigned. It ...
1
vote
0answers
14 views

How to get post type and month/year before while loop for date.php file

I am trying to create a date.php file for archives for some custom post types. I am using a while loop to get the posts: <?php while (have_posts()) : the_post(); ?> I want to customize the ...
0
votes
0answers
19 views

Posts are not displaying on their category and tag page

I created a post and assigned it a category and tag also. The post is displaying on the main post page. But the problem is when I go to the specific category page the post is not showing. For ...
0
votes
0answers
11 views

Display All Categories with Most Recent Posts and Featured Image

I am looking to build a custom archive page that automatically displays each category and the most recent 5 posts (featured image, date, and title) similar to https://bromabakery.com/recipes/. I was ...
1
vote
0answers
8 views

Dropdown to select posts by month and then displaying those posts in the archive page

I get how to select posts by month with a dropwdown, according to the Codex: <select name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;"> ...
1
vote
1answer
28 views

Get parrent category name

I have 3 levels of categories: Cat 1 - Cat 2 - Cat 3 -- Cat 4 I want to add Parent category name after page title. For example: <h1>Cat 4</h1> <p>From Cat3 in Cat 1</p> But ...
2
votes
2answers
18 views

Customize first page of category

I want to create a custom category page, only for the first page, displaying an article, related posts, latest posts. How can I do that?
0
votes
1answer
24 views

Group custom post type posts by month

I need help grouping posts by month+year (sorted by the date the posts were published a), when in result I'd have something like this: November 2019 Event 1 Event 2 December 2019 Event 3 Event 4 ...
0
votes
0answers
13 views

How do I set up a front-end toggle between my custom post order and chronological post order?

To make sense contextually, my posts need to be in a certain order, which is not the order that I will post them in. I'd like to be able to tag each post with a number, say, 0.1208, that will place ...
1
vote
0answers
39 views

Restoring default article pagination on archives – Removing custom limits

I am working on a website that is a customised WordPress installation running WP 5.2.4. There are a number of categories, as follows: main_category (id 71) other_cat_1 other_cat_2 etc. The post ...
0
votes
0answers
11 views

I want to be able to access archives to see how recently a post has been read: How can I do that?

Is there a way to access archives to see which posts have been read recently?
0
votes
0answers
16 views

How to limit posts on an archive page?

I'd like to display my posts in several pages with 30 posts each. I'm struggling to figure out the right way to do it. I know it's needed to add the pre_get_posts function, but I don't know how. The ...
0
votes
0answers
20 views

An archive widget, coming from nowhere on my posts and pages

Pretty much, it looks like this: And I really do not know where the "Acrhive" is coming from. This is how the Widget page looks like (either this way or the archive is set on the bottom): obviously ...
0
votes
0answers
17 views

Gutenberg Blocks Messes Up Layout?

So we designed a page that includes a section where featured news articles are displayed. The most recent article is displayed on the left side, while the other recent articles are displayed on the ...
0
votes
0answers
23 views

How do I remove the pagination terms after a single URL?

Here is a single URL 10stuffs(dot)com/technews. and it also displays the result when we add pagination terms like 10stuffs(dot)com/technews/page/2. I just want to keep the URL like this 10stuffs(dot)...
0
votes
1answer
21 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
38 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 ...
0
votes
1answer
27 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
29 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
0answers
55 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 ...
0
votes
1answer
36 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
33 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 ...
0
votes
1answer
22 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
16 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 ...
0
votes
2answers
98 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
23 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?...
0
votes
1answer
25 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
0answers
19 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 ...
0
votes
0answers
25 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 ...
0
votes
0answers
42 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 ...
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 ...
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 ...
0
votes
1answer
54 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 ...
1
vote
1answer
35 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
64 views

get_the_post_thumbnail() produces different HTML on same arguments

I am trying to display the featured image of the first post in the respective archive of the tag page. The template I am using is twentyseventeen. I already see the image by inserting the following ...
0
votes
0answers
241 views

How Can I Display the Category Description in a Theme with no Category.php or Archive.php?

I'm trying to display the category description on category pages below the title (category name). The challenge is that my theme is based on _s and doesn't have category.php or archive.php files ...
-1
votes
1answer
24 views

Create page like custom post type list in Wordpress

I would like to know if I can have a page in WP that works like archive.php for my custom post type. I would like that it works like when in Settings -> Reading I choose an static page like Posts ...
0
votes
0answers
17 views

Display archive posts from specific category on custom template page

I want to show yearly archives based on categories. But it shows all archives when I click on specific category. Can anyone help me please.
0
votes
0answers
36 views

How to show custom post count in archive page

I want to show custom post count of taxonomies in archive page..not all custom post counts of taxonomy, i just want to show videos custom post count. because taxonomies have two custom post type. ...
0
votes
0answers
19 views

How can you display archive in grid form for a post type?

I want to upload a bunch of art and comics, and to do so I am using the plugin 'webcomic' Each collection is set as its custom post type, and the archive is presented as a list with thumbnails and ...
0
votes
1answer
18 views

why get_the_post_thumbnail( the_ID()) echos extra post id

I have the following snippet which adds post thumbnails to products on archive page if matches a given product category, which will output the image but echos the the post id as well. How do I ...
0
votes
1answer
22 views

Do not show child pages within a file page

I have a CPT created, in my CPT file page the father pages and daughter pages are shown. Books of science Book 1 Book 2 Books of science fiction Book 1 Book 2 In my case I don't want it to ...
0
votes
0answers
27 views

Duplicate posts on archive page

I am loading posts through ajax and it seems new load produces duplicate posts on archive standard loop. This my code I have tried several methods with $do_not_duplicate but it seems none worked or I ...
1
vote
3answers
68 views

List of the years with posts presented

I need to get a list of the years with posts of given category. Like this: 2008, 2009, 2010, 2012, 2013 (if there were no posts in 2011, it's not included). I try this query, and it works — I get my ...
0
votes
1answer
38 views

Use the custom post type archive for taxonomies?

Im using a archive-cpt.php template page to display all my custom post type posts but now I will be categorizing them in taxonomies. I want to add a dropdown filter navigation that will be populated ...
0
votes
0answers
19 views

Check if there are posts with specific ACF field value in current archive query posts

I developed a custom ACF field archive filter which lets you filter posts with ACF fields - similar to Woocommerce product attribute filters. It loops thru all fields in a field group and echos all ...
0
votes
2answers
39 views

How to have a dynamic slug and rendering the archive-{post_type}.php?

So I have a Custom Post Type named network and Custom Taxonomy name company_category. Everything is all good until I can't render http://localhost/digitalhxstaging/company. Both Company Category and ...