Questions tagged [archives]

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

Filter by
Sorted by
Tagged with
2 votes
4 answers
18k 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 ...
Grant_E's user avatar
  • 21
2 votes
2 answers
4k views

Which URL to enter into browser to show all posts in archive.php?

Consider the simplest archive.php possible: <?php get_header(); while ( have_posts() ) { the_post(); the_title(); } get_footer(); What address should I type into the browser to get to ...
dotancohen's user avatar
2 votes
2 answers
162 views

Cache previous versions of website?

I'm working on a new site for a charity. They publish a printed magazine & we would like the website to always reflect the current issue of the magazine. So far I have a front page (home page) ...
speedypancake's user avatar
2 votes
1 answer
350 views

How to create tabled index of posts in a certain category

I have a tech blog, what I want to do is to create an index page for articles in a certain category. For example, I want all the articles under the category "WordPress BasiX" to be arranged in an ...
daNullSet's user avatar
  • 123
2 votes
1 answer
1k views

Using widget logic I want to show only a widget on the archive page if there are no posts

I have a custom post type with it's own taxonomy and I need to display a widget when on a category archive that is ONLY displayed when there are no posts. Currently I'm using this: is_tax( 'genre' ) ...
Aaron's user avatar
  • 21
2 votes
3 answers
611 views

Archive pages for posts based on their taxonomy?

Is it possible to display archive pages of posts based on their taxonomies, and an archive page of a term in that taxonomy?? For example, i have a site about beauty products, and i write a product ...
user avatar
2 votes
2 answers
412 views

Tag system like Quora?

What would be the best way to go for creating a tag-system similar to the one on quora.com? If you don't know what quora looks like, here is what I'm thinking about: On the tag archive page the user ...
Patrik's user avatar
  • 111
2 votes
1 answer
2k views

Change of permalink structure - redirects in htaccess breaks the archive links

When I started with my blog, the permalinks and following structure: http://<domain>/%year%/%monthnum%/%day%/%postname%/ Some time ago, I changed the permalink structure to "http://<domain&...
TFM's user avatar
  • 122
2 votes
1 answer
63 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 ...
Veronica's user avatar
2 votes
1 answer
2k views

Removing CPT slug from URL results in 404 error for archive page

I have created a CPT with rewrite rules as follows: "rewrite" => array( "slug" => "/", "with_front" => false ), In the functions.php, I have added the following code: function ...
Annapurna's user avatar
  • 324
2 votes
1 answer
3k views

Custom template for archive of a custom taxonomy

I've made a custom taxonomy named activities, containing items named local, member, and national: <?php function add_custom_taxonomies() { register_taxonomy('Activities', 'post', array( ...
Nicky Logan's user avatar
2 votes
1 answer
97 views

front end publishing not working on front-end page

I have a custom front end publishing form on my website, based on this article. It works perfectly when I put this code inside a page, but when on the front-end page (homepage), it doesn't work, and ...
user2882154's user avatar
2 votes
2 answers
975 views

Tag Archive for Custom-Post-Type Posts yielding 404 when permalinks set to postname

I have a custom post type "news_updates" which I have not given custom tags or categories. I have however created a normal tag (not attached to a custom post type), and assigned it to a particular ...
Josh Burson's user avatar
2 votes
1 answer
2k views

WordPress custom post type archive with description

I have a common design pattern I'm not entirely sure how to best execute in WordPress. The layout is a listing of post teasers (title, trimmed body, image) on an overview page. Let's say example.com ...
nathansh's user avatar
2 votes
1 answer
521 views

CPT: archive-cpt.php VS custom page template

I've created a CPT named portfolio. Now i want to create a page which will act as an INDEX for this CPT. Now i've two choices .... a) Make a custom template having custom WP_Query. In this way i can ...
Faisal Khurshid's user avatar
2 votes
1 answer
2k views

Get post type from taxonomy or category page

This might be somewhat backward, but how can one get the post type being displayed on an archive page? Alternatively, how can one get the post type associated with a given taxonomy?
emc's user avatar
  • 278
2 votes
1 answer
232 views

Category page only displaying the posts from a custom type

Situation I have two cpt: Projects Works In these two CPT I share the same taxonomy 'Category', and the same terms: Architecture Landscape Interior Design I have URLs like projects/architecture ...
Jonathan de M.'s user avatar
2 votes
1 answer
608 views

Archive dropdown styling not applied

I am trying to add a custom dropdown for archives but struggling with couple of mistakes that might be the reason why it doesn’t work. The CSS only gives my dropdown the width, not the other styles ...
Meigo62's user avatar
  • 37
2 votes
1 answer
414 views

Custom post type with tags

My understanding is, that custom post types can share tags with the posts also. I have created tags and applied them to a blog post and a custom post type. Yet when I click on a tag it only returns ...
user avatar
2 votes
1 answer
324 views

Custom-post-type-archive: posts sorted/filtered by year?

I have a custom-post-type wr_event whose posts are sorted by meta_key "event_date". Therefore I have this handy function … function get_event_list( $latest = true, $order = 'ASC' ) { echo '<...
mathiregister's user avatar
2 votes
1 answer
295 views

Archiving annual festival site

I have a query regarding managing a wordpress setup, I am sure others have been in a similar situation and was wondering what would be the best solution. I manage an annual festival's website, each ...
Keith's user avatar
  • 123
2 votes
3 answers
372 views

How to show static placeholder when less post elements in archive page?

I'm doing an archive page for a theme that will contain only images thumbnails. The maximum amount of thumbnails that the page layout can contains is 12. So as query I would like to been able to get ...
François's user avatar
2 votes
3 answers
5k views

Creating archive pages for children categories

Example: video cat id = 4 video cat child category id's = 7,8,9 news cat id = 5 news cat child category id's = 11,12,13 I wanna display choosen categories ( like video and news ) in the different ...
Fatih Toprak's user avatar
2 votes
2 answers
677 views

How to list custom post types?

Here's what I'd like to do: a) Create a custom post type and write panel for a menu item called "My Stuff." b) "My Stuff" will behave like a category -- but the content will not appear in the main ...
user5486's user avatar
  • 163
2 votes
1 answer
692 views

Skip first post on Category Archive

I have created a filter to skip first post of the archive on "podcast" category. Below is the code. add_filter( 'pre_get_posts', 'amd_limit_posts'); function amd_limit_posts($query){ if (...
aslamdoctor's user avatar
2 votes
5 answers
6k 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 ...
user110085's user avatar
2 votes
0 answers
148 views

URL scheme to retrieve tag archive by ID

You can retrieve a category archive by using a URL scheme like https://example.com/?cat=123. This even works if pretty permalinks are enabled. What is the equivalent query string for tags?
Florian's user avatar
  • 21
2 votes
0 answers
181 views

Custom query in archive.php with pagination nightmare

I want to run a custom query showing only subcategories of a specific category inside my archive.php with pagination. But, for some reason, it keeps counting (and paginating) by the number of post ...
bpy's user avatar
  • 299
2 votes
0 answers
3k views

change default post archive page link

I can't figure how to change the default post archive link. I've got few custom post types (for instance video_news, slug video), if I type www.blogname.com/video I get the archive.php. And every ...
user3590313's user avatar
2 votes
0 answers
550 views

custom taxonomy archive by year

there is one custom post type News there are 3 taxonomy terms(like category). 1). press-release 2). in-the-news 3). events i have list out all this three category. now what i am looking for is to ...
Jack Torris's user avatar
2 votes
3 answers
12k 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, ...
ptf's user avatar
  • 423
2 votes
1 answer
755 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 ...
eightnaut's user avatar
2 votes
1 answer
263 views

Custom Post Types and archives

I have a custom post type: cats When I visit http://mysite.com/cats I see all of my cat posts displayed using the template file archive-cats.php I filtered getarchiveswhere to only return posts from ...
gaoshan88's user avatar
  • 249
2 votes
1 answer
748 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->...
Mike's user avatar
  • 121
2 votes
1 answer
775 views

Page queried instead of a custom taxonomy

When I try to get an archive for a custom taxonomy, WP searches for a page and doesn’t find anything. The Setup My code from the functions.php: add_action( 'init', 'register_store_taxonomy' ); ...
fuxia's user avatar
  • 107k
1 vote
4 answers
58k views

Display "add to cart" button on every listing in product category page?

I need to place Add to cart button at every product on the page of certain category as shown below How can I achive this? Link to subject page oma-fintess.com.ua
Twissell's user avatar
1 vote
2 answers
5k views

Custom post type tag archives don't work for basic loop?

I have registered a custom post type with the right parameters. By that I mean I have added 'taxonomies' => array('post_tag','category'), I have also tried using register_taxonomy_for_object_type('...
Wyck's user avatar
  • 17.9k
1 vote
3 answers
8k views

Adding active/current class to get_terms list

I have a list of terms I'm displaying using "get_terms". Each term is linked so if the user clicks it, they go to the term archive page. <?php $terms = get_terms('category');t echo '<ul>';...
Johann's user avatar
  • 867
1 vote
3 answers
18k views

Use is_product_category() properly

I have two product category MULTILINGUAL DIGITAL MARKETING (ID 75) INTERNATIONAL SALES CHANNELS (ID 107) I want to run some code via if condition for these two category only. I tried using this ...
Nimesh Deo's user avatar
1 vote
1 answer
3k views

Show scheduled posts in archive page

I'd like my archive.php page's daily view (is_day) to display scheduled posts (post_status=future). For example, if I go to mysite.com/2011/05/20 I would see all posts scheduled to appear on May 20. ...
Ryan's user avatar
  • 515
1 vote
1 answer
6k views

Filter query_posts by tag slug on "Tag Archive" page (when tag is 2 or more words)

I'm using the following to bring up a tag archive page: <?php query_posts( "tag=". '' . single_tag_title( '', false ) . '' ); ?> This works perfectly for all tags of one word only, but any ...
KingLiNoodles's user avatar
1 vote
1 answer
5k views

Need post_type_archive_title function but in 'single'

I'm trying to pull a custom post type name/title out for use in the breadcrumb of a single-[cpt].php template file. In the archive-[cpt].php I can use post_type_archive_title() and it echo the name. ...
Mere Development's user avatar
1 vote
2 answers
2k views

Display most recent post in category instead of archive?

I've successfully redirected my blog page to my most recent post - i.e. so when you click the 'blog' link in the nav it goes to the most recent post page and you can click next/prev buttons to ...
fxfuture's user avatar
  • 1,337
1 vote
2 answers
677 views

Display CPT description on archive.php pages for all CPT

i'd like to show the CPT description on the archive.php page but it'd like to do it dynamically for all CPT's. I mean without specifying the current type myself. Something like the_archive_description ...
Michael Rogers's user avatar
1 vote
2 answers
7k views

Two differents queries in archive page

(Queries are definitively an infinite source of misunderstanding...) I try to display two types of informations in a tax archive (taxonomy-artiste.php) : The content of a page from a custom post (...
Cha's user avatar
  • 99
1 vote
2 answers
5k views

Change name of custom post type archive

I have a custom post type acme_reviews. I've namespaced it as suggested in tutorials to prevent future conflicts. But I want its archive page to simply be acme.com/reviews, not acme.com/acme_reviews. ...
Kleeramne's user avatar
1 vote
2 answers
9k views

When 'is_post_type_archive()' return true?

I visit archive page link http://src.wordpress-develop.dev/2016/ or http://src.wordpress-develop.dev/category/Markup/, on either page is_post_type_archive() return false. I have added ...
Lee Li's user avatar
  • 129
1 vote
3 answers
2k views

Editable content on a Custom Archive page

I want to allow my client to change some introductory text on a custom post archive page (eg. archive-unicorn.php), but I can't see how to do this. I guess one way I could do this is would be to ...
Django Reinhardt's user avatar
1 vote
2 answers
1k views

Custom Taxonomy Archive not displaying entries

I have CPT 'movie', with the following taxonomies: genre, director, and actor. The code used to register these is this: http://pastebin.com/yJ9XHCDk I have an archive movie page working using the ...
Prometheus Fire's user avatar
1 vote
3 answers
4k views

Show only post titles in archives?

I'm using the Twenty Fourteen theme and think it's stupid to show full posts in the Archives section. I want just the titles to be displayed for easier navigation. Even removing the dates would be ...
user1985189's user avatar

1 2 3
4
5
21