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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

0
votes
2answers
23 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
12 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
20 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
22 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
19 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
24 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
159 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
40 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 ...
0
votes
1answer
15 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
32 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
35 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
11 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
37 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
16 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
21 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
335 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
149 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
52 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
33 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
28 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
47 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
17 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
13 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
81 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
9 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
20 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
11 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; ...
0
votes
1answer
30 views

Customizing the output of the archive and category widget without altering the original behavior of the widget

The current unmodified output looks like this → <div id="archives-4" class="widget widget_archive"> <h2 class="h2b">Archives</h2> <ul> <li><a ...
0
votes
2answers
31 views

How to store archived copies of a WordPress site

Has anyone implemented a site archival capability that saves copies of what an entire wordpress site looked like at various past dates in times? I am looking for any plugins or codex development ...
0
votes
1answer
28 views

Custom category taxonomy - archive page not showing up

I am currently running against a wall while dealing with custom taxonomies. My intent is so use a taxonomy for categories for my custom post type, as to not interfere with the default categories used ...
0
votes
0answers
18 views

Archive is not deleting

Well I have been using WordPress to develop my website. There is a feature in my site is when someone fill the form, the inputted email will be saved as newsletter subscriber which was created by ...
1
vote
0answers
28 views

How to add Post Format Taxonomy Archive page in the menu?

I have customized the archive template for the post format using the Wordpress template file structure. I have the file: taxonomy-post_format.php which works fine. The page is then accessible ...
0
votes
2answers
22 views

I created a normal page, but the page displays as an archive page

I have created a normal page called "Clients," which should display the logos of my customers. But the page displays as an archive page. The page I'm talking about is http://zedwrites.com/clients/ ...
1
vote
1answer
337 views

Check if current term is a child of another term

I'm attempting to make an archive template that will apply only to subcategories of a particular term. My structure looks something like this: Events (main taxonomy) Tradeshow Show subcat 1 Show ...
0
votes
1answer
20 views

view a list of 3 future post, from the nearest to the most far

for my club's website I have a list of upcoming events. Every event is set with the date it will take place, so I'll have ordered it in archive. I already prepared the site fo view future posts via ...
0
votes
0answers
65 views

Translate Custom Post Type archive page title wit WPML

I'm using the WPML plugin to translate my site in two languages (Spanish is my main language, English the second one). I can't find out how to translate the archive page title of my Custom Post Type. ...
0
votes
1answer
117 views

Wordpress subcategories return 404 in custom template

I have a custom Wordpress theme and a main menu on top. This menu has links to different pages, one of them is a link to a Category (archive). It works fine for any first level category, but if I link ...
1
vote
2answers
45 views

How can i change the output of posts_nav_link();

I would like to change the output of posts_nav_link(); ( Or be pointed in a new direction, that's fine by me ) What i want to do is show < Previous archivepage| Next archivepage > even if ...
0
votes
0answers
311 views

Multiple category archive page

I am trying to create an archive page that shows posts that are in two categories in the same list. The listing should only contain posts that belong to BOTH categories, and not posts belonging to ...
0
votes
1answer
138 views

How can I get all archive-URLs to use the same template?

I notice that mysite/?post_type=my_custom are using index.php while mysite/2018/?post_type=custom are using archive.php. How can I get both of these requests to use the same template? Btw: I'm using ...
0
votes
0answers
56 views

Category template - conditional taxonomies

I'm using a plugin to load some posts into category pages and posts, but can't use the AND relationship feature between current category and other categories. My posts are related to more than one ...
0
votes
1answer
31 views

All tag/category/custom taxonomy archives 404

My issue is that mysite.com/tag and mysite.com/tags returns 404 errors. But if I have an eyeteeth tag then mysite.com/tags/eyeteeth returns posts with that tag. This also holds true for categories, ...