Skip Navigation

[Resolved] How to link to Taxonomy Archives.

This thread is resolved. Here is a description of the problem and solution.

Problem:
How can I produce a Link to a Taxonomy Archive in Views?

Solution:
You can use the GUI to produce the Link to it.
The output will be similar to:

[wpv-post-taxonomy type='category' format='url']

Relevant Documentation:
https://toolset.com/documentation/views-shortcodes/#wpv-post-taxonomy

This support ticket is created 8 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 5 replies, has 2 voices.

Last updated by sorinR 7 years, 11 months ago.

Assisted by: Beda.

Author
Posts
#393169

I am trying to: see an achive page for a custom taxonomy

I visited this URL: hidden link

I expected to see: all the songs sang by 98 degrees

Instead, I got: a 404 page

Here is the loop output

[wpv-layout-start]
<h2>Melodii cântate de <strong>[wpv-taxonomy-archive info='name']</strong> și recomandate de noi pentru dansul mirilor!</h2>
<p>
Dacă știi vreo melodie care ar trebui să apară aici, te rugăm să ne spui în <a href='<em><u>hidden link</u></em>' class='link_continut'>comentariile paginii Centrului de Melodii (vezi că sunt la finalul ei)!</a>
 </p>

	[wpv-items-found]
	<!-- wpv-loop-start -->
 
 <div class="itemList">
      <wpv-loop wrap="3" pad="true">
         [wpv-item index=1]                                                      
                   <div class="row-fluid">					
                   [wpv-post-body view_template="Preview melodie"]                  					
                  
         [wpv-item index=other]            
                   [wpv-post-body view_template="Preview melodie"]                  								                  
         [wpv-item index=3]
                   [wpv-post-body view_template="Preview melodie"]                  					
					</div>
                  
         [wpv-item index=pad]
                   <div></div>
                
         [wpv-item index=pad-last]
                   <div></div></div>        
                
      </wpv-loop> 
</div>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found] 
		[wpml-string context="wpv-views"]<strong>Nu am găsit nici o melodie care să respecte filtrele setate.</strong>[/wpml-string]
	[/wpv-no-items-found]
[wpv-layout-end]

and there is the view_template="Preview melodie"

[wpv-post-link]

#393262

To present a link to the Archive of a taxonomy you can use the GUI to produce the Link to it.
The output will be similar to:

[wpv-post-taxonomy type='category' format='url']

When you produce that Link, is it the same as you shared with me?

If so, can you re-save your permalink and make sure you do not use any Rewrite Rules neither in your Custom Taxonomy Edit Screen and Post Edit Screen of Types?

Does it work after re-saving the Permalink?

Otherwise, can you check if the issue also persist with a WordPress Default Theme and NO Plugins BUT the Toolset Plugins?

If not, could you then re-enable the Plugins one after the other, and check the issue each time you enable a plugin?
Please report me when the issue comes back
It might also be due to the Theme.
Please do reactivate your Theme only after you are sure the issue isn't coming form a 3rd Party Plugin.

If then the issue still persist, please confirm:

1. You do use a native not altered Theme (no custom code in the files)
2. You do not use a Plugin that somehow alter the URL's or Taxonomy Slugs
3. I would need to request temporary access (WP-Admin and FTP) to your site
- preferably to a test site where the problem has been replicated if possible -
in order to be of better help and check if some configurations might need to be changed

Your next answer will be private which means only you and I have access to it.

❌ Please backup your database and website ❌

✙ I would, if possible, need access to a site where only a minimal set of Plugins and a default theme is active.
This to avoid eventual compatibility issues with other software.

✙ I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site.
This is also a reason the backup is really important

✙ Please add the Links to:

- The Views Edit Screen

- The Page/Post where you insert the View

- The corresponding Front End Page/Screen

Thank you

#397953

Hi,

I would like to avoid giving acces to our site to a 3rd party, so let's try to solve the matter here

I have cleared the rewrite rules for a taxonomy and now the url of the archive page

hidden link

changed to

hidden link

Now it doesn't show a 404 page, and it displays something, but the footer of the theme is covering up the information.

I have two questions:

a) why can't i use dansul-mirilor/melodii/artist-formatie to prepend posts?
if i try to access it now with the new rewrite rules, it still shows a 404.

b) why is the archive covered with the footer?

The code to display it is simple:


<div>[wpv-layout-start]
<h2>Melodii cântate de <strong>[wpv-taxonomy-archive info='name']</strong> și recomandate de noi pentru dansul mirilor!</h2>
<p>
Dacă știi vreo melodie care ar trebui să apară aici, te rugăm să ne spui în <a href='<em><u>hidden link</u></em>' class='link_continut'>comentariile paginii Centrului de Melodii (vezi că sunt la finalul ei)!</a>
 </p>

	[wpv-items-found]
	<!-- wpv-loop-start -->
 
 <div>
      <wpv-loop wrap="3" pad="true">
         [wpv-item index=1]                                                      
                   <div>					
                   [wpv-post-body view_template="Preview melodie"]                  					
                  
         [wpv-item index=other]            
                   [wpv-post-body view_template="Preview melodie"]                  								                  
         [wpv-item index=3]
                   [wpv-post-body view_template="Preview melodie"]                  					
					</div>
                  
         [wpv-item index=pad]
                   <div></div>
                
         [wpv-item index=pad-last]
                   <div></div></div>        
                
      </wpv-loop> 
</div>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found] 
		[wpml-string context="wpv-views"]<strong>Nu am găsit nici o melodie care să respecte filtrele setate.</strong>[/wpml-string]
	[/wpv-no-items-found]
[wpv-layout-end]
<div/>
#398382

1. Now it doesn't show a 404 page, and it displays something, but the footer of the theme is covering up the information.

This is a issue with your template and needs to be handled in another Ticket.

It might be that you use Layouts or Custom code for this Template?
In any case this needs to be analyzed in another ticket.

I suggest to first make sure that this also happens with another Theme and with no Plugins but Toolset.

2. Custom Posts should be possible to be rewritten with a Custom Slug in Toolset > Post Types > Options > Rewrite > Use a custom URL format

The Slug of a Custom Post (single) is natively:

yoursite.com/post_type/post_name

With the current stable Types Plugin, actually it allows to REWRITE the post_type slug which usually is present in the slug.
This is valid for when you use the Permalink Settings "Any" but the native Plain permalink setting.

So that means, you can produce a Slug like:

yoursite.com/your_custom_slug/post_name

This will work ONLY if you do not use the Plain Permalink Setting in the WordPress Settings > Permalink

Wether you rewrite the Custom Post slug or not, the archive will be accordingly to your Rewrite Rule be accessible under:

yoursite.com/post_type/

OR (if rewritten)

yoursite.com/your_custom_slug/

This is valid for POSTs and POST ARCHIVES.

For Taxonomy archives, it is different.

Here, if you use the native settings in Toolset > Taxonomies > Edit > Options > Rewrite, you will seeing the Taxonomy Archive under:

yoursite.com/?taxonomy_slug=term_slug

If instead you rewrite the Taxonomy Slug in those options, you will see the archive under:

yoursite.com/custom_slug/testss/
#398914

ok. So I have done some tests.

1. the display issue doesn't remain when I switch theme. So the theme is causing the problem. I will open another support ticket about this.

2. When I rewrite the taxonomy to a one word format, let's say, "bla-bla-bla" the taxonomy archive page url, for example, becomes hidden link and it works,

but when i rewrite the taxonomy to another format, for example to "bla-bla-bla/something" (and we need this for SEO reasons) the taxonomy archive page url becomes hidden link , but it shows a 404

Any idea why it does this? A few months back we didn't have this issue.

#398921

ok.

I have managed to solve point two so thank you

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.