2022 Developer Survey is open! Take survey.

Questions tagged [archives]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
22 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 ...
user avatar
  • 11
1 vote
2 answers
31 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( ...
user avatar
  • 822
0 votes
0 answers
63 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 ...
user avatar
0 votes
0 answers
10 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 ...
user avatar
  • 1
0 votes
1 answer
15 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 ...
user avatar
  • 16
0 votes
0 answers
9 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' ), '...
user avatar
0 votes
0 answers
19 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?
user avatar
0 votes
1 answer
16 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 ...
user avatar
0 votes
1 answer
16 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 ...
user avatar
  • 145
0 votes
0 answers
11 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 ...
user avatar
0 votes
0 answers
35 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' ), ...
user avatar
  • 141
0 votes
0 answers
13 views

Calling an Archive Page with specific Tag/Tax ID

Hope I am explaining this correctly. I need to style a specific archive page with the taxonomy: dn_campaign_cat and the tag ID: 115; it shows as below on the front end. www.site.com/campaign-cat/...
user avatar
  • 1
0 votes
0 answers
15 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 ...
user avatar
0 votes
1 answer
18 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' =...
user avatar
0 votes
0 answers
15 views

How to achieve a multi-taxomony layout with posts?

I'm trying to achieve a layout involving a Custom Post Type and Multiple "categories". For example, I have a post type called "Diagrams" and the categories will be "Guitar&...
user avatar
0 votes
0 answers
68 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?
user avatar
  • 1
0 votes
1 answer
35 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 ...
user avatar
0 votes
0 answers
15 views

Create a CUstom Archive by Year, but just for a Single Category

I have a request from my designer to create a list of links to a page that only shows posts published by year and that belong to a specific category. So here is the design: I've found a function that ...
user avatar
  • 1
0 votes
0 answers
20 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 ...
user avatar
  • 71
0 votes
2 answers
111 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: &...
user avatar
0 votes
1 answer
42 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 ...
user avatar
0 votes
1 answer
46 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 ...
user avatar
0 votes
0 answers
23 views

Strip subcategory base from URL

I got the following code: function wpa_alter_cat_links( $termlink, $term, $taxonomy ){ if( 'category' != $taxonomy ) return $termlink; return str_replace( '/category', '', $termlink ); } ...
user avatar
  • 1
0 votes
0 answers
44 views

Woocommerce custom archive page custom content and shortcode

i'm setting up a shop with woocommerce. My pages are built with ACF (header : title, image, introduction of page, custom page builder for main content still with ACF) so i can customize each page ...
user avatar
  • 1
0 votes
1 answer
109 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? ...
user avatar
0 votes
0 answers
10 views

Different post slug based on archive

I need some help with my current WordPress site. The site got 6 post categories. Posts can have multiple of these categories. The slug of the posts include the category slug. For each of the ...
user avatar
  • 1
0 votes
1 answer
55 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 ...
user avatar
0 votes
1 answer
32 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 "...
user avatar
0 votes
1 answer
38 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 ...
user avatar
0 votes
1 answer
26 views

Archive per year of a custom post getting the wrong post

Archive per year of a custom post getting the wrong post I got the wp_get_the_archives() to list the years of my post but even though the url is ok, the post shown in the year archive just give the ...
user avatar
0 votes
0 answers
16 views

Displaying the Archive Page's Name on the Page

I have one PHP question about my web project built with Wordpress, Divi, Advanced Custom Fields and Divi Machine. I am a little bit familiar with PHP so I will explain my issue with more than you need,...
user avatar
0 votes
0 answers
25 views

How to show all the posts under the same Year in a page WordPress?

is it possible to show the posts of the same year in a page and the post with different year in other pages. If Yes, then how?
user avatar
0 votes
1 answer
18 views

How to share the author's archive?

<hr> <h3><?php esc_html_e( 'Forums', 'bbpress' ); ?></h3> <?php if ( bbp_get_user_last_posted() ) : ?> <p class="bbp-user-last-activity">...
user avatar
1 vote
0 answers
37 views

Change CPT archive title

I've created a custom post type named "documents" wich is working fine. By default, the CPT archive page title will also show "documents" as a title. I want to change that page ...
user avatar
0 votes
0 answers
22 views

Permalinks settings: Post category page keeps redirecting to a page

WP version: 5.7.1 Web server: nginx Plugins: deactivated I am trying to get to a certain permalink structure, that an SEO agency is advising me to use. Looks quite simple, but I can't get it to work. ...
user avatar
0 votes
0 answers
12 views

Posts arranged by Sub Category in Category page, But not showing non Sub category items

I'm trying to create Category posts under each sub category, that's working but With out sub category items not showing... <?php $categories = get_categories('child_of='.get_queried_object()-&...
user avatar
  • 23
0 votes
0 answers
35 views

Add terms to a taxonomy archive from within the same taxonomy

not sure if this is even possible (guessing it should be though)... I have a custom taxomomy of status, containing the following terms... pending, collecting, started, doing, dispatched, delivered, ...
user avatar
0 votes
0 answers
54 views

the_posts_pagination() not working if I add wp_head() to header.php

I have WordPress template my problem is with the_posts_pagination? its not showing in archive page I try to delete same functions to see what is the function to see. when is delete wp_head() function ...
user avatar
0 votes
1 answer
362 views

How to edit wc_get_template_part for archive products

I want to set a custom style for displaying prices on sale in woocommerce archive page. I could do that in single-product.php file but in archive page its just wc_get_template_part( '...
user avatar
0 votes
1 answer
25 views

Permalink Short code showing unnecessary link text inside the loop

Recently I need Help regarding this permalink shortcode function my_permalink(){ ob_start(); the_permalink(); return ob_get_flush();} add_shortcode('my_permalink','my_permalink'); for this, I get a ...
user avatar
  • 1
0 votes
0 answers
37 views

Creating archive like functionality through birectional relationships

I could use some guidance in something where I may have developed myself into a corner. Here is the situation I have: CPT: Communities CPT: Innovators CPT: Success Stories Any Innovator or Success ...
user avatar
0 votes
0 answers
30 views

archive by year and category: permalink support doesn't work on pagination

I found here: Category archive by year with permalink support /category/YYYY the solution to obtain a category-by-year archive also supporting perma: function catyeararchives_init() { ...
user avatar
0 votes
0 answers
23 views

Attribute Posts to User via Custom Field Value

I have a custom user role on my website "reviewer" of which one can view an archive page, just like a normal author, where published posts are attributed to that user and displayed in ...
user avatar
1 vote
0 answers
13 views

Category being displayed without base parmalink

My permalinks are set as /%category%/%postname%/ But I am getting duplicate pages domain.com/category/jazz is also the same as domain.com/jazz I do not want domain.com/jazz to display as an archive ...
user avatar
  • 11
0 votes
1 answer
86 views

Display WordPress archive template page in 3 columns and not 1 column [closed]

I'm trying to achieve the following: Currently WordPress display them in 1 column: Is there code I can Add to the template file, to display all the blog post in this grid layout
user avatar
1 vote
1 answer
24 views

Featured Images Not Loading In Blog Archives

A client running a custom theme recently updated their WordPress version from 5.2.7 to 5.7.1. After this update, featured images in blog archives are no longer loading. The theme has been updated to ...
user avatar
0 votes
1 answer
18 views

How do I make an array to get the category name, dynamically, in an archive template?

I'm new to php and wordpress. I am building an archive template that has to make a masonry gallery with all the posts of the current category. I have to replace the 'edito' with a dynamic piece of ...
user avatar
  • 1
1 vote
0 answers
24 views

How to change category and year archive permalinks/rewrite rules?

first of ll I'd like to find a way to substitute 'category' with 'events' in permalinks. Currently I've got this: http://example.com/category/post-name/ And I would like it to be: http://example.com/...
user avatar
2 votes
1 answer
22 views

What type of page should i use? static page or category page? and what's the difference? [closed]

I’m a new WordPress user and i’m very confused about my how the structure of my website should be. I’m creating a language learning website and i started with the static pages (Home, about, etc.) Then ...
user avatar
0 votes
1 answer
35 views

Why is my archive.php redirecting to front-page.php?

I generate archives using wp_get_archives() and get list of all my archives. But when I click one of the links its always redirect me to front-page.php which is www.mydomainexample.com. I've created ...
user avatar

1
2 3 4 5
20