Questions tagged [archives]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
35 views

Wordpress Custom Post Type Archive, filter by category and get pagination working

I have created 9 different Custom Post Types via ACF and an assortment of custom field blocks for 8 of them. Those 8 are used to create different content, based on requirements for each post type. The ...
Mitch S's user avatar
  • 15
0 votes
0 answers
9 views

A theme has 3 default types posts, services and portfolio in its posts grid.I want to add my custom post type products How can I achieve that?

Here it display the dropdown list of options to be displayed in asri post grid. I have made my custom_post_type Our products which I want to be listed here.
Deepika Jain's user avatar
0 votes
0 answers
12 views

Separate archive template to show posts and CPT by same category/taxonomy

I have archives for posts and another for reviews which are working fine, try as I might though I'm struggling to have a separate archive under the URL /content/[category] that pulls both posts and ...
james's user avatar
  • 1
0 votes
0 answers
17 views

Create an archive page by combining two post type

I wanna create an archive page for both normal posts and a custom post type(gallery). I created an index.php file and put my code in there but its pagination ain't work correctly. all pages look the ...
Poorya Ghorbani's user avatar
0 votes
0 answers
16 views

author archives, showing all custom post types, problem on pagination

Please, look at the link to the page I need support with. This is a website where several “authors” make their reviews on books or create some original posts. This page shows “Badges” which are all ...
Ioria's user avatar
  • 11
0 votes
2 answers
27 views

Display posts in a random order for a specific category

How to show posts in a random order when an archive of a certain category is being showed like as example: mysite.com/category/name-of-specific-category? I have searched everywhere but could not find ...
Renato Gelforte's user avatar
0 votes
1 answer
42 views

If all posts have exactly the same publication date/time, to the second, what order are they listed in the main query?

In a default Wordpress setup with ten posts. If I manually update the publication date for all ten posts to be exactly the same date/time, then go to the blog page of the site to view them all, what ...
Jules's user avatar
  • 83
0 votes
1 answer
49 views

How do I get an intermediary page between 2 custom post types?

EDIT: I am going to simplify this whole question. If I have domain.com/something/{$variable} how do I retrieve that $variable to use in a query within my template. This is really the extent of the ...
Jon C's user avatar
  • 73
0 votes
0 answers
33 views

Display posts on category archive organized into subcategories?

I have been trying to achieve this as part of a WordPress theme, where users can assign a FAQ style template to a Post category of their choice, which is then organized into subcategories for easy ...
Jesse Nickles's user avatar
0 votes
0 answers
15 views

Date-based archive URLs to match my /2023/Jun/13 permalink structure?

So, I have a custom function that adds a %monthname% variable to use in permalink settings instead of the native %monthnum%, so that I can have the three-letter month abbreviation in post URLs because ...
Bix F.'s user avatar
  • 1
0 votes
0 answers
13 views

printing taxonomy and meta fields values

I have the following code in order to print the post ID in a certain point of the archive page. In the same line I'd like to print other meta data, better to say an icon and than the corrispondent ...
Andrea Sacconi's user avatar
0 votes
1 answer
177 views

How to get all child categories of current parent category in product detail page of woocommerce? [closed]

I have a product in child category of a parent category , there are many other sibling of that child category , I want to show them separately in current product page. Clothes (parent) > (child) ...
Ali Raza's user avatar
0 votes
0 answers
99 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 ...
Devin's user avatar
  • 298
0 votes
0 answers
90 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). ...
Jelle Tempelman's user avatar
0 votes
1 answer
296 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 ...
DSC's user avatar
  • 1
0 votes
0 answers
25 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 ...
Meivel's user avatar
  • 1
0 votes
0 answers
10 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', '...
Conrad Mafer's user avatar
0 votes
0 answers
26 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 ...
Nico's user avatar
  • 1
0 votes
1 answer
34 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 ...
Álvaro Franz's user avatar
0 votes
0 answers
24 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 ...
Ramate's user avatar
  • 1
0 votes
1 answer
164 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-...
WP Shala's user avatar
0 votes
1 answer
21 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), ...
casterapple's user avatar
0 votes
0 answers
36 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 ...
RaWa's user avatar
  • 3
0 votes
1 answer
128 views

Custom taxonomy archive empty

I have created a custom post type with the following arguments: $args = [ 'label' => 'Projects', 'labels' => $labels, 'description' ...
Badger's user avatar
  • 191
1 vote
0 answers
99 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 ...
Ibrarr Khan's user avatar
1 vote
0 answers
73 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". ...
Thomas's user avatar
  • 99
0 votes
0 answers
124 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 ...
rafaelfndev's user avatar
0 votes
1 answer
85 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/...
ivanacorovic's user avatar
0 votes
1 answer
24 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 ...
Mike Hermary's user avatar
1 vote
0 answers
117 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 ...
dubyaD's user avatar
  • 21
0 votes
1 answer
174 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 ...
Paul Briggs's user avatar
0 votes
1 answer
152 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 = "...
Daniel Leandro's user avatar
0 votes
0 answers
56 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 ...
ClintN's user avatar
  • 1
0 votes
1 answer
18 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 ...
Alex's user avatar
  • 1
0 votes
1 answer
71 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 ...
Teymur Abbasov's user avatar
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 ...
Zan Lah's user avatar
  • 11
1 vote
2 answers
979 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( ...
fefe's user avatar
  • 844
0 votes
1 answer
51 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 ...
mir's user avatar
  • 16
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' ), '...
Avijit Palit's user avatar
0 votes
1 answer
114 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
51 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 ...
John's user avatar
  • 157
0 votes
0 answers
114 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 ...
Alessandro's user avatar
1 vote
1 answer
288 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' ), ...
Tantalus's user avatar
  • 151
0 votes
0 answers
38 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 ...
Alex Abell's user avatar
0 votes
1 answer
166 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' =...
HenThai's user avatar
0 votes
0 answers
632 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?
mm42's user avatar
  • 1
0 votes
1 answer
566 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 ...
Ibrarr Khan's user avatar
1 vote
0 answers
28 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 ...
Thomas's user avatar
  • 99
0 votes
2 answers
422 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: &...
Alex Osipov's user avatar
0 votes
1 answer
908 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 ...
Tom Perkins's user avatar

1
2 3 4 5
21