Questions tagged [archives]
A page showing more than one post in the main loop.
1,004
questions
0
votes
0
answers
28
views
Why my archive title isn't showing?
I' have a strange problem (well, maybe stupid, but I'm too burned out). My archive pages don't show titles when they' are for a taxonomy. This only happens in the archives for a custom taxonomy. The ...
0
votes
0
answers
9
views
Creating a custom archive page for WooCommerce products based on tags
I'm looking for some help in creating a custom archive page for my WooCommerce products. Currently, my products are assigned to different categories and some are linked to a event (custom taxonomy). ...
0
votes
1
answer
22
views
My Website’s Main URL redirects me to an Archive Page
desperately need your help as I’m completely new to this concept called “WordPress”. When I visit www.mydomainname.com, it automatically pulls a page that shows “Archive” right under my Logo and the ...
0
votes
0
answers
20
views
WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
I'm having one Custom post type I have added a Sticky Option to that Custom Post Type. When I choose the post as sticky means it's not working for me.
I have tried the below code.
Please don't add ...
0
votes
0
answers
6
views
Attachment tag archive
I have found very useful code that creates attachment tag archive
function ahub_query_attachments()
{ global $wp_query;
{
$wp_query->query_vars['post_type'] = array( 'attachment', 'page', '...
0
votes
0
answers
12
views
Sort Category Archive pages and place sticky posts first
I have a very simple request: I want to sort my posts within the category (or tag) archive page by date (which is the default), but put all sticky posts first.
I found working code snippets for ...
0
votes
1
answer
25
views
How to display the archive for native posts
I want to display an index of all posts, separate from the homepage.
The current settings on my WordPress Admin > Reading is:
I have a file called archive.php in my theme folder.
But when I visit ...
0
votes
0
answers
21
views
WP Query + custom fields: How to query event posts from the current date backwards 6 months and organize it month by month?
I am having some trouble figuring out the logic of this query and what I need to do to make it work.
I created an "Event" custom post type, and every Event post has a date value coming from ...
0
votes
1
answer
80
views
Show custom category archive as front page and remove taxonomy slug from urls
I have an art portfolio site in development.
I have used CPT UI to set up:
post type: works
taxonomy: mediums
mediums: paintings, etc
The best way I could think to set this up was to use taxonomy-...
0
votes
1
answer
20
views
Adding commas between post titles on an archive page?
I am working on my archive.php, which is used by several different custom post types.
On the archive pages, I would like post titles to display with commas between them (but not after the final post), ...
0
votes
0
answers
34
views
Taxonomies starting with a hyphen (minus) to assign B.C. dates to a post
I have a date slider to filter posts in the archive by a custom taxonomy that assigns specific years to each post. I would also like to assign B.C. dates to some posts. I figured this would work best ...
0
votes
0
answers
16
views
How to have infinite scroll consider passed parameters?
My theme supports infinite scroll.
I have turned on infinite scroll via jetpack.
Without infinite scroll, when in the archive of a taxonomy term, I can have a query string parameter which I look for ...
0
votes
1
answer
56
views
Custom taxonomy archive empty
I have created a custom post type with the following arguments:
$args = [
'label' => 'Projects',
'labels' => $labels,
'description' ...
1
vote
0
answers
60
views
How to link ACF relationship field to the new Query block in Full Site Editing
I am using the new Query block on WordPress Full Site Editing and I am trying to figure out how to connect that to the ACF relationship field.
So I have an ACF field on my category that allows the ...
0
votes
0
answers
18
views
Blog suddenly shows Archive instead of index page
I've searched all over the Net but this doesn't seem to be a common problem My blog https://wholeearthmama.com suddenly is showing Archive Posts images, not sure if this is a PHP problem or something ...
1
vote
0
answers
54
views
Over 500.000(!) unwanted archive pages, major duplicate content problem
We have a large WordPress site with around 17.000 posts and various categories and tags. Google Search Console shows over 500.000 with the notice "Duplicate without user-selected canonical". ...
0
votes
0
answers
16
views
How to display dynamic additional contents on archive pages?
I want to display some additional contents on monthly archive pages. The tricky part is, for every month, the addtional contents are different, sometimes it is a chart, sometimes it is a picture, ...
0
votes
0
answers
43
views
Is possible register two archive pages for single custom post type?
I have a custom post type registered with register_post_type( 'courses', $args ); (like documentation), and I use template archive-courses.php for page www.example.com/courses. I'm using this archive ...
0
votes
1
answer
41
views
Category archive page has two URLs even when default theme is active with no active plugins
I've changed my permalinks to Custom: /%category%/%postname%/, and that (I suppose) caused my category archive pages to have two URLs. For example, category SPORT is available on /sport and /category/...
0
votes
1
answer
22
views
Image loading function not working on archive.php template
I am using the following function to display a post thumbnail or ACF custom field image depending on the page type being viewed. This function is loaded from the inc/template-tags.php file in the ...
1
vote
0
answers
43
views
How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT
What I have:
example.com/movies/{post} <!-- custom Post Type single post, e.g. /movies/batman -->
example.com/genres/{term} <!-- custom Taxonomy single term e.g. /genres/action -->
What ...
0
votes
1
answer
80
views
Disable Author Archive just for certain roles in bulk
Hi I have a lot of users that have the role in wordpress as "Buyer" I want to be able to disable these users archive page so it is not public but I want to keep public users that have the ...
0
votes
1
answer
69
views
Array_search ignoring the first element [closed]
I made (copy) a function to make the url of the custom post (named investigacion) by year.
function tex_get_archives($post_type = 'investigacion') {
global $wpdb;
$query2 = "...
0
votes
0
answers
60
views
exclude certain categories form archive widget
i need some help for this...i want to hide posts of one specific category from appearing in the (sidebar-)archive-widget (chronological order, dropdown). I already tried to use the "ultimate ...
0
votes
0
answers
47
views
get_children() Archive Template
This is my first attempt at coding & I have come unstuck with the wp_query loop integration.
I just want to build a template for a page that will check for children and list their respective ...
0
votes
1
answer
17
views
Link back to (paged) archive and find the correct page
in my single.php i want to add a "back-to-overview"-button which leads to the posts archive. But if my post is located in, lets say, page 7 of the archive, i want my back-button link to this ...
0
votes
1
answer
28
views
Display if author page is author page of current user
in my multi author website I have a button that users can upload their avatars. I need to display this button in author page. I can do it. I added this button to author page. The problem is that ...
1
vote
1
answer
26
views
Getting category posts from a certain year
Is there a way to get category posts from a certain year?
I know how to get all posts posted in a certain year -> www.example.com/**year**/
or with months -> wwx.example.com/year/month (that's ...
1
vote
2
answers
590
views
Add additional first page, last page links to the_posts_pagination()
Is there a way to add additional first and last page links to the pagination object if it is rendere with the the_posts_pagination() method?
At this point I have the following
the_posts_pagination(
...
0
votes
0
answers
276
views
Woocommerce. Get a list of products in the current category on the archive page and product page
I'm trying to create a small code that will display a list of discounted products that belong only to the category of products that the user is on, that is, if the user is on the clothing category ...
0
votes
0
answers
25
views
Page Slug Won’t Change - Can’t Edit Archive Page With Slug or Reassign Slug
I took over a website that was developed by someone else and have rebuilt it to function in Elementor. Everything works great, except for one Archive page with the slug “our-projects” that I can’t ...
0
votes
1
answer
37
views
how does the wordpress rest API work
so I am looking into the wordpress REST API for the first time.
I have some questions that may sound ridiculous to those that are familiar with it, but i am confused as to how it works.
So natively ...
0
votes
0
answers
13
views
Custom post archive page not opening 404 page
I have custom post type like this
register_post_type( 'workforce_archive',
array(
'labels' => array(
'name' => __( 'Workforce Archives' ),
'...
0
votes
0
answers
22
views
How to create archive page to add in menu
I have a menu like this below
But I can't find the page. Is this a wordpress page or template located somewhere?
And how can I create archive page?
0
votes
1
answer
46
views
users post count
I'm trying to set up users archive pages;
I notice that, if a user exists and is the owner of a custom post, it doesn't have an archive page;
so I looked inside user.php in order to include custom ...
0
votes
1
answer
27
views
How to enable [archives] short code
I want to use the [archives type=yearly] short code on a side bar widget so that people can click on links and see posts for the year. But this is the result I'm getting:
This is what I'm doing in ...
0
votes
0
answers
50
views
How can I stop redirecting from a search to a taxonomy archive page
I have a search form that searches through custom taxonomies, but instead of printing the results on the search page it redirects to the taxonomy archive. I leave the url before and after the redirect ...
1
vote
1
answer
182
views
In a WP_Query can I force the results' is_singular() to be set to false?
I have a custom page template that includes a basic query after the main content. like this:
$myPosts = new WP_Query(
array(
'post_type' => array('post', 'contentTypeA', 'contentTypeB' ),
...
0
votes
0
answers
33
views
How can I combine Wordpress default Tags and bbPress tags into one archive page?
I'm trying to figure out how to combine two taxonomies?
I've got three things going on:
Tags from Buddyboss's Forums (Buddypress/bbpress)
Tags from The Events Calendar Pro
Tags from Wordpress's ...
0
votes
1
answer
95
views
Display all Categories except ones with a specific parent
I'm trying to display all post-categories except those who have an specific parent-categorie.
Can someone help me?
This is my current code:
<?php
$categories = get_categories( array(
'orderby' =...
0
votes
0
answers
405
views
Is it possible to set archive.php instead of index.php to display blog?
I have index.php and archive.php in my theme, but I'd like to using archive.php to display blog and category posts.
Is it possible to override index.php by archive.php?
0
votes
1
answer
312
views
How to overwrite the category template in a plugin
So I basically need to overwrite my category template in my child theme with the one in my plugin but I can't seem to get it working.
I have checked the files paths and everything and there all ...
1
vote
0
answers
24
views
Thousands of unwanted URLs/pages with "0" in slug created
We’re experiencing a weird problem which neither our specialized hosting provider WPEngine nor several WP experts could solve so far:
Thousands of unwanted URLs/pages are created based on existing ...
0
votes
2
answers
287
views
First archive page with a few posts
I'm looking for a way on how to display only a few posts on a first page of my archive. This is my archive template — page-archive.php, which I am using as a template to display all my posts/recipes:
&...
0
votes
1
answer
513
views
How to create pagination on archive.php template
I'm creating a custom theme and I'm struggling to get pagination working on my archive.php template.
I've tried to adapt the code I'm using on my main blog page, but it's simply displaying all blog ...
0
votes
1
answer
351
views
How to link current logged-in user to their author page via URL (Beginner)
I require a URL that links the current logged-in user to their author archive page. I came across some code from a similar question here (see below). It works for me but unfortunately, it links to the ...
0
votes
1
answer
387
views
How to disable date archives?
Is there a way to disable date archives in WordPress?
For example, I don't want to have date archives (example.com/2021/06/11, for example) available at all. Is there a way to turn these archives off?
...
0
votes
1
answer
151
views
Exclude specific post from query
In the category post archive, I want to display the last 10 posts and 1 featured post (featured post only on the first page).
I can choose a featured post that will be displayed first (user can select ...
0
votes
1
answer
33
views
List of post categories only associated to another custom taxonomy
I've got a custom taxonomy "sector" associated to posts; posts are assigned to the default categories as well. What I'd like to achieve is to show in a custom sidebar a list of "...
0
votes
1
answer
64
views
What's the name of the custom post type yearly archive template?
I know there's a name for every kind of template. archive-CPT.php, or single-CPT even taxonomies taxonomy-taxonomyname.php but, what's the name I should use for the template that have my yearly ...