Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

1
vote
1answer
56 views

Wordpress showing archive.php instead page

I have a problem with same name (slug) for category and page and wordpress is showing archive.php instead page custom template. Permalinks settings for category is . and i want to stay this way but ...
0
votes
0answers
9 views

Custom post type categories giving 404

I have a custom post type called "News" which looks like this: /** * Register "News" custom post type */ function news_custom_post_type() { $labels = array( 'name' =&...
0
votes
0answers
11 views

How Can Create Separate Tender Archive Section and Current Tender Section in WordPress

I'm trying to create a WordPress Archive section for Tender, and I'm having a little difficulty with creating an easily accessible archives page. How Can Create separate Tender Archive Section and ...
0
votes
0answers
18 views

How to stop WordPress from generating tags pages

Okay to explain better what I want to do. I use the default WordPress post tags to filter my content, and add tags to power the custom search engine I use inside my website. But in no way do I use ...
0
votes
0answers
11 views

Set function to skip Buddypress profile page/tab

I am using the following code, within my function.php file, to set the author links to point to the buddypress profile pages for each author, rather than the default author archive pages they'd ...
0
votes
0answers
20 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 ...
0
votes
2answers
23 views

Adding pagination to a custom archive template

I'm trying to add pagination to my archive template. If I use the same code as on my main blog template it doesn't filter results based on the tag in the URL, instead it simply shows all posts. ...
1
vote
2answers
108 views

Display posts from #6 to #20 on archive page

My client shows his 5 most recent posts (excerpts) on the homepage followed by a "read more" link. On archive page he does not want to display the 5 most recent post again but posts from #6 to #20. ...
0
votes
1answer
32 views

Archive URL returns 404 error for Custom Post Type

Having issues with a custom post type that returns a 404 error when I visit the archive page. get_post_type_archive_link() for the post type (called project_profiles) returns the URL mysite.com/...
0
votes
1answer
14 views

Changing author links on homepage to buddypress profiles - without affecting ability to link to author archive throughout the site

I've set all author links to head to the author's buddypress profile rather than the author archive page. I've done this through my child theme's function.php file. *add_filter( 'author_link', '...
0
votes
0answers
8 views

Order by 3 custom fields in archive Woocomerce list

I'm trying to order the products in woocomerce archives pages by 3 custom fieds, my code is: add_action( 'woocommerce_product_query', 'imcar_custom_product_query' ); function ...
0
votes
0answers
62 views

How to customize template for custom post type archive page using genesis

I have created a custom post type, and an archive template called archive-casestudy.php which simply contains: <?php genesis(); ?> Presently when I load this archive page I see the title of ...
0
votes
1answer
18 views

Display archives based in post_format

I'm working in a project that needs to use post_formats. First of all, is there any way of create a new post format? The only thing I've found was to overwrite an existing one. In addition, they're ...
0
votes
0answers
24 views

Exclude taxonomy term in archives, but make it readable on its own

Background: Making an event site that automatically hides expired events. Using WP-Cron and some tinkering, I've made it so my CPT "event" automaticly has an "Active" term in the taxonomy "Status", ...
0
votes
0answers
16 views

Can we set Wordpress archive with 2 month

How to display the archive widget drop down list as jan- Feb, Mar-Apr like that or 15th Oct - 15th Dec, 15th Dec- 15th Feb etc?
0
votes
2answers
28 views

Meta Box: display single image on an archive-template

I'm trying to get the url of an image from a MetaBox (plugin) filed on an archive-page. <?php if ( rwmb_meta( 'field-id' ) ) { // Get images $img_srcset_large = ...
0
votes
0answers
13 views

Show archives as a drop-down in the main navigation menu

I am using the Independent Publisher: 2 theme. It looks like this in action. I would like to be able to access my blog archives by clicking on the navigation menu, as a drop-down. In other words, I ...
0
votes
1answer
21 views

Order archive custom posts by taxonomy term [duplicate]

I cant change the way things are, so I cant use custom meta... I have terms that are years and I have to display the archive in order (newest to oldest-in terms, not published date) For example the ...
0
votes
2answers
24 views

Custom Post type & Taxonomy 404

I've created a custom post type & taxonomy, however when I go to my taxonomy page it throws a 404 error and I can't understand why. // Register Custom Post Type function portfolio_post_type() { ...
0
votes
1answer
26 views

What php gets called for home_url/somepage URL?

This is going to sound quite stupid for most experts but for a beginner it's not clear what .php code gets called when visiting a home_url/year/month URL. For example, domain.com/2018/05 shows all ...
1
vote
1answer
25 views

Filter post by clickable year [duplicate]

How can I get all the year of posts in archive.php and put it on the list? 2016 | 2017 | 2018 And after clicking any year, It will show the posts of the selected year www.example.com/post_type/2018....
0
votes
1answer
35 views

Create simple columned archive page

I'm attempting to create a custom archive page ordered in breakable columns (depending on the resolution). Ideally something that is as simple as possible under the hood. So: What would be the best ...
0
votes
1answer
21 views

How to create archive pages for metadata query generated posts (so without taxonomy)?

It is a bit complicated to formulate (or maybe just I'am so tired now), but I trying will be clear: I want creating archive pages for liked posts by users. This will be similar to author pages, like: ...
1
vote
2answers
471 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 ...
0
votes
0answers
49 views

Template issue for woocommerce category?

I have a list of categories as parent category and also a list of child categories under the parent. When I am clicking the category, I am being redirected towards content-product.php template instead ...
1
vote
1answer
43 views

How to show the archive / post type description on Single templates

I have a Custom Post Type with an archive description. Both the following functions return said description from the archive-cpt.php template, as expected: the_archive_description() echo ...
0
votes
1answer
42 views

wp_get_archives doesn't take effect from css or html

I'll try to keep it short. So basically I'm trying to add custom item to my menu which in this case is the archive dropdown list with months desc. Everything looks nice and clean but the output of ....
0
votes
1answer
36 views

How to tell if a page has subpages for Custom Post Types

I would like to show a page depending on whether it has a subpage or not. That is, if you have subpages, do not display the subpages, only the parent page to which it belongs. Something like this: ...
-1
votes
1answer
22 views

Woocommerce shows empty columns [closed]

In my wordpress site, i installed woocommerce. In archieve categories and shop page the products not setting correctly. They looks like: XXX X XX But I want to display correctly in the grid: ...
0
votes
0answers
20 views

How to create multiple parameter archive pages (i.e. something like /$post_type/$taxonomy/$term/)?

Basically, I have three custom post types: videos, news, & reports and a couple custom taxonomies: region & blog — that I'd like to create "sub-archives" for, using the following structure: /$...
1
vote
0answers
56 views

add_rewrite_endpoint returns 404 on archives

My endpoint works on all kind of single pages and homepage, but it returns 404 in archive pages, either categories or custom taxonomes. I have reflushed rewrites but I don't get it work. This is my ...
1
vote
1answer
23 views

How to get “last year from [spec year] that has posts”?

I have a year archive like this: ◀ 2010 - - - - - - - - - - - 2011 - - - - - - - - - - - 2012 ► And first I had the idea that a year with no posts would be just the same page with the ...
0
votes
0answers
11 views

How to stay on date.php archive page even if no posts? [duplicate]

I use WordPress's date.php file for year archive. And on that age I first show the current year and then you can click prev or next for previous or next year. But if the next or previous year doesn't ...
0
votes
0answers
33 views

Archiving Posts and/or Optimizing wp_posts

I'm seeing poor performance from large post queries. This is in my mysql slow.log: # Query_time: 0.896177 Lock_time: 0.000083 Rows_sent: 1 Rows_examined: 105329 SET timestamp=1527092770; SELECT ...
0
votes
1answer
23 views

Make category archives page in menu non-clickable

I have a website with 2 categories in the menu. The first one is "Blog", which I would like to keep when you click on it. The second one is "Veel bezocht" and there are a few posts linked to this ...
1
vote
1answer
15 views

List taxonomies according to whether this post is in another taxonomy in taxonomy archive

I have two taxonomies for categories of custom post type 'items'; 'type' and 'group'. They are not exclusive so one hierarchical taxonomy won't work although to an extent, as you'll see, they are ...
0
votes
0answers
678 views

How to remove “archive” in title?

How to remove "archive" in title? The category page is "technology", I have no idea why there is a word "archive" behind it.
0
votes
1answer
371 views

Bootstrap Accordion with Dynamic content Wordpress Archives Unique ID

​ Hello, I have an archive posts page where I am pulling in the posts dynamically and sorting them by Year then Month. I am trying to add the bootstrap accordion effect hiding the months under the ...
0
votes
2answers
99 views

show image gallery in archives or category page

i want to show image gallery in archives.php or category.php. The featured image and text content is showing but not image gallery. Below is the code inside category.php. I have tested to show one ...
0
votes
1answer
74 views

Prevent Archive URLs

My Wordpress site goes looking for an archive page if I append a year after the URL. For example: http:/mysiteurl.com/my-site/2018. If there are posts from this year, it ends up redirecting to index....
0
votes
1answer
17 views

What's wrong with default posts archive?

This is my template for archive.php template: <?php /* Template Name: Archives */ ?> <?php include 'head.php' ?> <body> <?php include 'header-page.php' ?> <...
-1
votes
1answer
31 views

Custom post type pagination problem - page 1 and 2 show same content

I have a custom post type for frequently asked questions, called Question. Its archive is at /faq/. Page 1 and 2 of the archive currently show the same content. I did some digging and on page 1, ...
1
vote
1answer
65 views

Modify query in pre_get_posts action is messing up my nav menu

I am modifying the query for custom archive pages. I am using the pre_get_posts action. I need to catch some GET variables to modify my query. It is working great on the archive page for one custom ...
0
votes
0answers
20 views

Have different Post Archive Slug to Post slug?

I have 2 Custom Post Types in 1 archive page. $args = array( 'post_type' => array( 'event', 'news' ) Page works fine, both CPTs link to there correct posts. I want my archive slug to be '...
-1
votes
1answer
14 views

Adding Custom Post Types to category/tag/author archives breaks header content

I'm using the following code in functions.php to add Custom Post Type content to my Category, Tag and Author archives: // Add New Custom Post Types to Archives function rtt_add_cpts_to_archives( $...
2
votes
2answers
109 views

How do I display the “Archives” widget layout (sidebar) in Wordpress by 'year' then by 'months'?

I am using the default widget in my sidebar Archive which currently displays the archive this way: Mar 2018 Feb 2018 Jan 2018 However, I'd like it to display this way: 2018 March February January ...
0
votes
1answer
11 views

What do I need to style for the page after wp_get_archives?

http://summitcoach.web.dmitcapstone.ca/ Just a development server for now, but on the blog page I have links for monthly archives but they go to some page I believe is date.php and I just want the ...
0
votes
0answers
22 views

How to create a completely functioning separate archive for posts from only 1 or 2 specific categories

I can't seem to find a complete way of resolving my issue. I've found parts, but it seems I'm the only one out there who has the issue I do. I have a web working with WP, and recently I've been asked ...
0
votes
0answers
13 views

Archive only for /year/month, not terms

I want archive template to be used when I visit /year/month, for example /2018/04. But I don't want the archive template to be used for terms. For example: /tag/news or /countries/sweden. How do I ...
0
votes
0answers
74 views

Combining Years Within Archive Widget

I currently have the standard archive widget running in a sidebar producing a list of years using the code: function my_limit_archives($args){ $args['type'] = yearly; $args['show_post_count'] = true; ...