Add filters for my CPT

Posted in: Newspaper
Post count: 31

Hello,

I’m looking to display the CPTs I’ve called “training” with a filter system on the front end. I’d like users to be able to filter both by category and by label. How can I do this?

I tried on this page (https://cadentes.dessitesetdesclics.fr/nos-formations) with a “flex block 1” but I can only display filters for categories but not for tags. I’ve also tried using the “Flex Loop Filters” module, but it only displays posts, not my CPT.

Post count: 27744

Hello,

You can set here taxonomies, categories, and tags, but please make sure that you have not set a custom post type on the block https://i.imgur.com/RaOgDOo.png -> https://i.imgur.com/rktjn6C.png
Also, please check this guide https://forum.tagdiv.com/search-setup-for-custom-post-type/

Thank you!

Post count: 31

I must have misspoken : I created a sample post with the “formation” slug and which have “categories” and “tags”. And I’d like to display the filters with the categories and tags of this CPT.

View post on imgur.com

View post on imgur.com

Post count: 27744

Hello,

So, let me understand: do you just want to display the categories of a specific post, or how? Please give me more details. Also, here you need to make sure that you set the taxonomy names correctly (category, tag, taxonomy) https://i.imgur.com/9Bne1e0.png, and it will display all categories, tags, and taxonomies that you have, even if they don’t belong to the respective post

Thank you!

Post count: 31

In fact, I’d like to display on one page all the elements I’ve created with the post type called “formation”. And above these elements, I’d like to offer filters for users to filter by category or tag.
I had seen a topic that looked like what I wanted to do : https://forum.tagdiv.com/topic/add-filter-option-in-category-template/
You see this multiple filters : https://imgbb.com/njBDHN9
I don’t want to show posts but only my post types called “formation”.

Post count: 27744

Hello,

Yes, you can do it with the filter options. Have you tried it?

Thank you!

Post count: 31

I tried but it doesn’t work

View post on imgur.com

View post on imgur.com

Post count: 27744

Hi,

The Flex Loop Filters works only Flex Loop Block, so please check the video -> https://we.tl/t-wUcb8IHpvW

Thank you!

Post count: 31

Hi Anamaria,

Thanks, it works ! I have three others answers please :

– Is it possible to change what is written in the title of my filters ? I’d like to replace “Tags” with “Training type”.
– I can’t put a shadow behind my elements as I did on this page: https://cadentes.dessitesetdesclics.fr/actualites/
– How can I get my elements to have the same height? I have the same request for the Flex Block 1 that I put on this page: https://cadentes.dessitesetdesclics.fr/actualites/

Post count: 27744

Hello.

1. You can set the title you want using the element custom title and hide the headers -> https://i.imgur.com/ZT0yHWO.png
2. You can set the shadow here https://i.imgur.com/IoLi30k.png
3.In order to make them to look the same size, you’ll need to set an excerpt on title and post content like this -> https://i.imgur.com/o8UQm5B.png
Also, you can set the excerpt on words or letters from theme panel -> https://i.imgur.com/c7Q8ckX.png
Here is a similar topic -> https://forum.tagdiv.com/topic/flex-block-1-and-same-blocks-height/

Thank you!

Post count: 31

Hi,

Thanks for these explanations. I have two additional questions:

– I’ve put in two dropdowns and I’d like to change the “Select category” and “select tags” labels to put in custom text. Where can I do this?

– I’d also like to choose the width of these two dropdowns so that the list that appears when you click can be displayed on a single line.

Post count: 31
Post count: 27744

Hello,

You can set a custom text for the select, and you can translate it from here: https://i.imgur.com/o9oCczV.png,. But for the tags and categories, no.

Thank you!

Post count: 31

Thanks. And about this ?

“I’d also like to choose the width of these two dropdowns so that the list that appears when you click can be displayed on a single line”.

Post count: 27744

Hello,

I apologize because I didn’t answer your question. You can set the width here https://i.imgur.com/DnE98Dp.png

Thank you!

Post count: 31

Thank you for your answer, it helps a lot.

I have an other problem. On phone version, I don’t see this two modules : Flex Loop Filters and Flex Loop Builder. They are on this page : https://cadentes.dessitesetdesclics.fr/nos-formations/

Can you help me please ?

Post count: 27744

Hello,

Please check if you have enabled this option https://i.imgur.com/8mDItjq.png
Also, have you created a mobile page?

Thank you!

Post count: 31

Great ! Thanks

Viewing 18 posts - 1 through 18 (of 18 total)
The forum ‘Newspaper’ is closed to new topics and replies.