Skip Navigation

[Resolved] views categories, subcategories and post

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 9 replies, has 2 voices.

Last updated by Waqar 1 month, 2 weeks ago.

Assisted by: Waqar.

Author
Posts
#2683639
Screenshot 2024-02-15 alle 16.59.23.jpg
Screenshot 2024-02-15 alle 16.58.30.jpg

Greetings,
I'm trying to view posts like how it's done with woocommerce:
category1, category2, ... categoryn
subcategory1.1, category1.2..., subcategoryn.m
subcategory1.1.1, subcategory1.1.2, ....

post1 (category1.1.1), post2 (category1.1.1), ...

I had to do the views because I can't do them with the content template.
Category management seems to work fine.
To view the posts I inserted a view inside the category view. it's right? However, I am unable to show only posts from the selected category. I tried all the settings but I'm definitely doing something wrong. you can help me?
I hope I have explained myself
thanks
federico

#2683717

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Federico,

Thank you for contacting us and I'd be happy to assist.

To suggest the next steps, I'll need to see how these items are set up in the admin area.

Can you please share temporary admin login details, along with the link to the page where these views can be seen?

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

regards,
Waqar

#2684065

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

screenshot-view-setting.png

Thank you for sharing these details.

In your website's view 'Lista Corsi vista', I made the following changes, as can be seen in the attached screenshot:

1. I unchecked the option 'Don't include current page in query result', because we do want to show the posts related to the current term's archive.

2. Next, I added a taxonomy filter in the query filter section, so that 'Categorie Corsi' the same as the current archive page.

#2684933

Hi,
perfect, now it works fine.
I still have one little thing to ask.
I would like to understand what is the easiest way to make bread crumbs

Regards
Federico

New threads created by Waqar and linked to this one are listed below:

https://toolset.com/forums/topic/split-adding-breadcrumbs-to-the-website/

#2684958
Screenshot 2024-02-23 alle 17.06.01.jpg

sorry I have another question.
the customer asks me to insert the title and image of the parent category into the subcategories. I think to do that I need to create a view. For some categories it works but for others it doesn't. I don't understand what I'm doing wrong.

#2685221

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for the update and glad that it works.

> the customer asks me to insert the title and image of the parent category into the subcategories. I think to do that I need to create a view. For some categories it works but for others it doesn't. I don't understand what I'm doing wrong.

- Can you please share some examples of where it works and where it doesn't? I'll be able to suggest the next steps, accordingly.

Note: For your question about the breadcrumbs, I've created a separate ticket and will follow up on that shortly.

#2686011
Screenshot.png

in this page
hidden link
the title of the parent category should appear in the center, but I can't set it.

#2686231

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

The link to the archive page you shared showed the '404 not found' message.

But looking at some other taxonomy archive pages, I see that the view 'Titolo Corso Genitore' should be showing the result, when it is not.

To troubleshoot this further, do I have your permission to download a clone/snapshot of the website? This will help in investigating this on a different server, without affecting the actual website.

#2686234

Yes, of course. go on.
sorry for the link. here's a correct one.
hidden link

#2686450

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

screenshot-query-filter.png

Thank you for the permission.

During testing on your website's clone, I was able to make the 'Titolo Corso Genitore' view work as expected, by following these steps:

1. In your active child theme, you'll find this file named 'taxonomy-categoria-corso.php' that is being used to show these taxonomy archive pages.

2. At line# 56, you'll see this code to call the view 'Titolo Corso Genitore':


<?php echo do_shortcode('[wpv-view name="Titolo Corso Genitore"]') ?>

3. You can replace with the following lines so that the view's shortcode, uses the current term's ID in the view's shortcode attribute 'terms':


<?php $current_term_id = do_shortcode('[wpv-taxonomy-id]'); ?>
<?php echo do_shortcode('[wpv-view name="Titolo Corso Genitore" terms="'.$current_term_id.'"]') ?>

4. And in that view's query filter settings, also set the taxonomy filter to use this shortcode attribute 'terms' for filtering, as shown in the attached screenshot.

After these changes, the view will start showing the correct result, based on the current taxonomy archive's term.

#2686806

Perfect. now it works as I wanted.
thanks

federicoA confirmed that the issue was resolved on 2024-03-07 08:32:47.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.